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.

through this connector, there clearly was an “Expand Query” option. This website post shall assist explain how exactly to make use of this.

Note: take a look at Sara Lagerquist’s exemplary weblog called “CDS vs CDS: exactly exactly exactly What Connector can I used in energy Automate?“. This can assist you recognize the distinction between your popular information provider connectors.

Let’s Dive In

Energy Apps Solution

To begin with, i’ve currently produced a remedy in the energy Apps maker site called “PA Flows” (for “Power Automate Flows”). The step that is next be to generate an innovative new movement inside the solution.

Note: For this instance, We have currently started a movement with a Flow Button due to the fact trigger. You might use whatever trigger you need inside your flow(s).

The Flow Setup

When you look at the movement, We have a “List documents” action (renamed “List Opportunities”). In this instance I am detailing the possibilities from Dynamics 365. We additionally have simple ODATA “Filter Query” of “statecode eq 0” (0 = Active/Open).

Now, let’s take a look at that which we can grab through the production associated with the “List Records” action. I wish to see if I’m able to obtain the Opportunity’s:

  • Associated Account’s title
  • Associated Owner’s title and email 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”

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

While you can see below, we have actually developed a straightforward FetchXML with “Opportunities” once the main entity and also have website link entities towards the Account, Contact, and consumer entities. For every entity i’ve added in a few areas.

The next move is pretty cool. In the FetchXML Builder device it is possible to view the charged power Automate Parameters.

When it is chosen, a tiny screen will pop-up using the values you’ll need for energy Automate.

Spot the “Expand Query” values detailed? Remember right end for the industry is chopping off that which you see. Just click regarding the “Expand Query” field plus it shall be copied to your clipboard. I’ve pasted the worthiness into Notepad++ to demonstrate you the complete value.

You can view the schema title associated with entity’s that are related followed closely 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 regarding the “List Records” action.

With this specific 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” can be acquired. In the event that you remember, this isn’t available earlier in the day.

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

What 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 dog owner information?

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

Testing the Flow

Now it to see the output from the HTML Table that we have the flow set up, let’s test.

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

To help validate this, the output is put by me into A excel file.

In Summary

By leveraging the “Expand Query” option, we spared steps that are many energy Automate. For instance, in the event that you wished to have the linked green singles login Account’s name, you’ll utilize the “Get a Record” action. But, because the possibilities come in a list (array), when you link the “Get an archive” into the “List Records”, an “Apply to each” shall appear. You will have to loop through most of the possibilities to link every one with all the proper Account to then obtain the Account Name.

Leave a Reply