Then(hopefully) you are aware of the “Common Data Service (current environment)” (CDS-ce) connector if you use Power Automate (Flow) and model-driven Power Apps.

Then(hopefully) you are aware of the “Common Data Service (current environment)” (CDS-ce) connector if you use Power Automate (Flow) and model-driven Power Apps.

inside this connector, there was an “Expand Query” option. This web site post will assist explain just how to utilize this.

Note: take a look at Sara Lagerquist’s exceptional weblog called “CDS vs CDS: exactly exactly exactly What Connector can I use within energy Automate?“. This can assist you realize the real difference amongst the typical information provider connectors.

Let’s Dive In

Energy Apps Solution

To begin with, i’ve currently produced an answer in the energy Apps manufacturer site called “PA Flows” (for “Power Automate Flows”). The next thing would be to generate a brand new movement inside the solution.

Note: For this instance, We have currently started a movement by having a Flow Button because the trigger. You might use whatever trigger you desire inside your flow(s).

The Flow Setup

Within the movement, We have a “List records action that is”renamed “List Opportunities”). In this instance i will be detailing the possibilities from Dynamics 365. We additionally have simple ODATA “Filter Query” of “statecode eq 0” (0 = Active/Open).

Now, let’s discover that which we can grab through the production regarding the “List Records” action. I would really like to see if the opportunity’s can be got by me:

  • Associated Account’s title
  • Associated Owner’s email and name target
  • Associated Contact’s title

We inserted a “Create HTML Table” action to look at the array production through the “List Records”.

I search with “account” as you can see above, the Account Name is not listed in the dynamic content when.

Utilizing “Expand Query”

With all the flow that is basic, let’s make use of the “Expand Query” option within the “List Records” action. First, you might be asking, “What do we placed into this industry?” Great concern! And, there clearly was a solution that is great.

As you possibly can see below, we have actually produced a straightforward FetchXML with “Opportunities” because the main entity and possess website link entities to your Account, Contact, and consumer entities. For every single entity i’ve added in a few areas.

The step that is next pretty cool. Inside the FetchXML Builder device you are able to view the charged power Automate Parameters.

When this will be chosen, a little screen will pop-up because of the values you’ll need for energy Automate.

Spot the “Expand Query” values listed? Take into account that right end associated with the industry is chopping down that which you see. Click on in the “Expand Query” field also it will be copied to your clipboard. I’ve pasted the worthiness into Notepad++ to exhibit you the value that is full.

You can observe the schema title for the related entity’s field accompanied by the chosen field’s schema title.

Now, let’s observe this works inside Power Automate.

Back in energy Automate, i shall newly paste in the copied “Expand Query” values to the “Expand Query” field from the “List Records” action.

With this particular industry updated, this may now let us grab that given information inside our “Create HTML table” action.

First, let’s determine if the “Account Name” is present. In the event that you remember, this isn’t available early in the day.

As you care able to see above, the “Account Name” is currently available!

Think about the “Contact Name”? We added this to the “Expand Query” field if you recall.

Yes! The Contact’s “Full Name” is available and visible to pick.

okay… how about the master information?

Now let’s finish upgrading the “Create HTML Table”.

Testing the Flow

Now that people have actually the movement put up, let’s test that to begin to see the production through the HTML Table.

As you care able to see, the dining table offers the information we are in need of.

To help validate this, we place the production into a succeed file.

To Conclude

By leveraging the “Expand Query” option, we spared numerous actions within energy Automate. For instance, in the event that you desired to have the connected Account’s title, you’d utilize the “Get a Record” action. But, considering that the possibilities come in an inventory (array), as soon as you link the “Get an archive” into the “List Records”, an “Apply to every” will appear. You will have to loop through most of the possibilities to link each one of these with all the proper Account to then obtain the Account Name.