Although in your case it is not the best option, if from the Canvas application, you want to pass a list of values to the Power Automate (PA) and in the PA filter you want to use the IN clause, then what you would have to do is this:
Let's assume your Combo has these elements in the Items property:
[{Id: 1, Value: "One"}, {Id: 2, Value: "Two"}, {Id: 1, Value: "Three"}, {Id: 4, Value: "Four"}]
The call to your PA would look like this (you need convert your selected items into JSON):
PowerAppsExportAllToExcel.Run(JSON(cbRegion.SelectedItems),User().Email)
In your PA you would have to do the following:
- Add an action of type Data Operation - Parse JSON, you will have to generate the schema with the value that arrives to the Query parameter of your PA. With my example, the JSON is
[{"Id":1,"Value":"One"},{"Id":2,"Value":"Two"}]
- Add an action of type Data Operation - Select. In the From, you need to put Dynamic content to Body from previous action (Parse JSON) and in Map it is not necessary to put key and value, if you look to the right there is an option that says: "Switch map to text mode", click there y tendrás que poner esto: Double quotation mark and single quotation mark then add as dynamic content the result of the previous action of the Select and then single quotation mark and double quotation mark. If you press in Peek code you should see this:
"inputs": {
"from": "@body('Parse_JSON')",
"select": "'@{item()['Id']}'"
}
- Add an action of type Data Operation - Compose, and put this expression: (In my case "Select" is the name of the action of step 2)
join(body('Select'), ',')
- Finally, in the action where you are making the query to the Dataverse table, in the filter, you will have to put: (XXX you will have to replace it with the dynamic content of the result of the action in step 3, which was to join all the values of the array with a comma.)
(Microsoft.Dynamics.CRM.In(PropertyName='cr21b_requirementid',PropertyValues=[XXX]))
The only problem with this, which works perfectly, is that once you save the PA, exit and edit it again, you will get an error in step 2 of the Select, you will have to put double quotes at the beginning and at the end again.