Below is the Flow to process the query and pass the results back to Power Apps
Create an Instant Cloud Flow that is triggered by Power Apps and create a step to initialise the variable passed from Power Apps
In the Dataverse Step, having selected the required table, navigate to the Fetch XML Query section and paste the FetchXML copied from FetchXML Builder earlier
Add a Select step. Select is used to transform data but we will primarily use it to get the XML output from the previous step, as you’ll see. Set the From field to ‘value’ which is the output from the previous step. Map the Keys and Values as required
Add an Initialise Variable step. This will create the array variable containing the output to pass back to Power Apps. Give the variable an appropriate name and set the Type field to Array. The Value is the Output from the previous step
Finally add a Response step. Set the Body to the variable created from the previous step
Save the Flow. Click on ‘Test’, ‘Manually’ and then ‘Run Flow’
Within the test results, open the Select step and copy the body contents, which is in XML format. Now return to edit the flow and open the Response step, click on ‘Show Advanced Options’ and then ‘Generate from sample’. Paste the Body text copied to the clipboard and select Done
Back in the List Rows Dataverse step, within the FetchXML, identify the section that you want to make dynamic insert the variable from the prior Initialise Variable step, but make sure you keep the quotation marks surrounding the variable. Save the Flow
The flow should look like that below