Search Application Using Power Automate With Canvas App

This Power Apps Tutorial will discuss how to get data from Dynamic 365 using MS Flow.

We will also see how to search records from Dataverse Account Entity on clicking a button using the Power automate from the canvas app.

Step 1

We will Create MS Flow to get data from the dynamic 365 account entity and send a response to the canvas app.

Navigate to https://make.powerapps.com/

Once the above link opens, please click on flows from the left navigation and click on new flow.

Search Application using power automate with canvas app

Please select instant cloud flow

Search Application using power automate with canvas app

As per the requirement, give the flow name and select PowerApps.

Search Application using power automate with canvas app

The next step is to create two variables, Name and City, because our application will search based on these two inputs.

Search Application using power automate with canvas app

Search Application using power automate with canvas app

The next step is to select list rows from the power app where we need to select our entity (Ex: Account entity) and click on show advanced options to write our Fetch XML that we have downloaded from advance find.

Search Application using power automate with canvas app

Search Application using power automate with canvas app

We can get the counts of each record.

Create one variable and give this formula "@length(body('List_rows')?['value'])" as per the below screen.

Search Application using power automate with canvas app

The next step is to create compose and Body inputs fields.

Search Application using power automate with canvas app

Now we need to add step parse JSON in the content field and add Outputs as value, and we need to generate our JSON Structure.

Note: if we don't know how to generate JSON, please run the flow till the above compose step and take generated JSON.

Search Application using power automate with canvas app

Now we need to apply each condition to map fields from the output that we are getting. Please follow the screen below.

Search Application using power automate with canvas app

The final step is a response, and in the Body column, we need to add value and click on Show advanced option to generate a JSON template.

Search Application using power automate with canvas app

Search Application using power automate with canvas app

Finally, our MS Flow will look like the below screen.

Search Application using power automate with canvas app

Step 2

Create a canvas app and design your app as per the below screen.

Search Application using power automate with canvas app

Next step, we need to bind our MS Flow when the user clicks the search button. Please find the below screen for reference.

Search Application using power automate with canvas app

Add a Data Table to the Canvas app to display search results.

Search Application using power automate with canvas app

In the item property, enter Flow Output because while binding flow we have set variable Flow Output to get a response from MS flow.

Click on the edit field and your fields in the data table based on your needs.

Search Application using power automate with canvas app

Final screen with output.

Search Application using power automate with canvas app

Search Application using power automate with canvas app


Similar Articles