Using Expand Query in Power Automate with Dataverse | Dynamics 365

Fredrik Engseth
4 min readNov 4, 2021
Example of multi step for retrieving related table

A simple example on how you can use the expand query in Power Automate to retrieve properties from related tables. Instead of listing cases and then have another action/step that gets the contact like the example below. (Example continues below the image)

Example of multi step for retrieving related table

You can solve the use of the extra step using expand query in the list record action. (More on how to below the image).

Image of the Expand Query field in the List rows action in Power Automate.

To find the properties you need for expanding the related tables you can do the following.

Step 1: Create a flow that uses the Dataverse List Rows action. In this example we trigger the flow manually and list cases in Dataverse. I have added row count to one to limit the amount of rows that gets listed.

Step 2: Next step I used the Compose action to output the result from the List Cases action. The output will be used to find the navigation properties that we need for expanding the related tables. Copy the output from the compose output.

--

--

Fredrik Engseth
Fredrik Engseth

Written by Fredrik Engseth

Developer | Dynamics 365 | Power Platform | Azure | Personal development | Investments | ☕ https://www.buymeacoffee.com/fredrikengseth

No responses yet