web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get a table in ...
Power Automate
Unanswered

How to get a table in Power Apps from Power Automate?

(0) ShareShare
ReportReport
Posted on by 2,295

Hi,

 

I'm sending two values from Power Apps to Power Automate. These are being used to filter a Dataverse table I want to get back into Power Apps as a collection.

 

So this is my flow:

WebPortal_0-1700420309030.png

I'm afraid I can't go back to the old designer, but these are the details:

WebPortal_1-1700420341779.png

 

 

WebPortal_2-1700420367242.png

 

WebPortal_3-1700420383163.png

 

Back in Power Apps, I have button wiht the OnSelect property:

 

Set(myVar, MyFlow.Run(5, 6).resposta

 

So, upon clicking the button, I see the result of the variable is:

 

WebPortal_4-1700420492189.png

 

"Text Error: ConstraintViolated"

 

I simply want to get the JSON back into Power Apps.

Categories:
I have the same question (1)
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    There are two issues with the way you are doing it. 

    1) Respond to Power Apps action can't send back an array.  It can only send back a string.  To send back an array you need to use the HTTP Response action and provide an appropriate Schema in the advanced settings.

    2) If you are sending back an array then you want to capture the array as a collection using ClearCollect() instead of Set()

  • WebPortal Profile Picture
    2,295 on at

    @Pstork1 

    As always, I value your insight!

    I've tried the HTTP Response, before the "Respond to Power Apps" action, but I struggle with the schema.

    This is a dataverse table, what kind of schema should be passed?

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    Use the HTTP response in place of the respond to Power apps.  For the Schema, just grab the output you are returning from the table from a previous run and paste it into the Generate from Sample button under advanced Settings. Its the same process as using a Parse JSON.

  • WebPortal Profile Picture
    2,295 on at

    I have been pulling the (rest of) my hair in order to get the schema right....

     

    I've tried copying everything within the "value", like this:

     

    [
          {
            "@odata.type": "#Microsoft.Dynamics.CRM.cre05_results_joa_api",
            "@odata.etag": "W/\"11809741\"",
            "@odata.editLink": "cre05_results_ja_apis(1e3989da-9d85-ee11-8179-000d3a655712)",
            "statecode@OData.Community.Display.V1.FormattedValue": "Ativo",
            "statecode": 0,
            "statuscode@OData.Community.Display.V1.FormattedValue": "Ativo",
            "statuscode": 1,
    ....
    }
    ]
     
    But I get the error:
     
    The input parameter(s) of operation 'Response' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Response'.
     
    Then what am I supposed to enter here????
     
    I never get it...
  • WebPortal Profile Picture
    2,295 on at

    And these are the input parameter:

     

    WebPortal_1-1700425865615.png

     

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    Are you pasting that into the panel that opens when you click on the generate Sample Schema link?

    First click on Show all

    image.png

    Then click on the Use Sample Payload to generate schema link.  That will open a panel. Paste the sample in the panel and click Done. That will generate the schema for you.

    image.png

  • WebPortal Profile Picture
    2,295 on at

    Yes, that's exactly what I'm doing:

    WebPortal_0-1700426499500.png

     

  • Verified answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    It looks like you are pasting it directly into the schema rather than the dialog that opens up when you click on the Generate Sample link.  Take a closer look at my second screenshot. I highlighted the link you have to click on to get the dialog to open. That is where you paste the sample to generate the schema.

  • WebPortal Profile Picture
    2,295 on at

    LOL, that's exactly the case 🙂

    Thank you!

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Just curious - is there a reason you are running Power Automate to filter a Dataverse table and return the data? Why not just add a connection to the Dataverse table in your Power App and use a Filter on the table to show the results you're after. This would return the results quicker, and overall more efficient (will run the Filter delegated) and no need for a Power Automate.

     

    As an example, when I select an item in my Gallery it resets my collection including a filtered set of results and certain columns that I want in my collection. 'Product Catalog' is my data source.

     

    ClearCollect(colItems, ShowColumns(Filter('Product Catalog', 'Product Type' = Gallery2.Selected.Value), "crcb7_title", "crcb7_codename", "crcb7_productcategory"))

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard