Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

create 2 collections based on HTTP response from flow containing 2 different array/object sets

(1) ShareShare
ReportReport
Posted on by 222
Hello -
 
I have figured out how to get two different array/object sets into the output of an HTTP response action in power automate with the applicable and different JSON schemas. The action output is as expected.
 
Using a canvas button OnSelect, ClearCollect and running the flow I am able to populate the StorePrices collection, see function pictured below. This works like a charm.
 
Is there a way to apply the ZonePrices part of the flow HTTP response payload to a different collection without adding another canvas app button with another flow?
 
 
 
 
Categories:
  • Suggested answer
    Ravindra Jadhav Profile Picture
    Ravindra Jadhav 240 on at
    create 2 collections based on HTTP response from flow containing 2 different array/object sets
    Hii,
    You Are Using Premium Connector You can Directly Pass the combined table in Power Apps
     
    Please Closed the Question, Mark it Solved 
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
  • Cgangweg01 Profile Picture
    Cgangweg01 222 on at
    create 2 collections based on HTTP response from flow containing 2 different array/object sets
    Hello Bhaskar,
     
    I redid the schema in the Response action and readded the flow to the app and your solution worked! Each of the arrays is in a different collection which is exactly what I wanted. Thank you!
     
    My next problem ... for some reason the collections are no longer showing as data sets available to any new table I add.  I think it might be a bug with power apps but I'm not sure.  Any idea?
  • Cgangweg01 Profile Picture
    Cgangweg01 222 on at
    create 2 collections based on HTTP response from flow containing 2 different array/object sets
    Thank you so much BhaskasDhone for the reply.
     
    I was able to set the variable and pull in the first collection for StorePrices. That worked when I ran the app.
    But when I construct the second collection it does not recognize the property ZonePrices. See first screen shot.
     
    When I try to refresh the flow connection I get an error, see second screen shot. I have a hunch that the flow Body of the HTTP response is not in a good format. I have the properties StorePrices and ZonePrices separated by a comma which does not give an error in power automate so I thought it was good. See third screen shot.
     
    Any suggestions at this point?
     
     
     
     
  • Verified answer
    BhaskarDhone Profile Picture
    BhaskarDhone 779 on at
    create 2 collections based on HTTP response from flow containing 2 different array/object sets
    You can first get the complete power automate response into a variable and then use variable to fill collection.
    Something like below
     
    Set(varPowerAutomateOutput,GetCurrentpricebySKUresponse.Run(TextInput1.Text));
    ClearCollect(colStorePrices,varPowerAutomateOutput.StorePrices);
    ClearCollect(colZonePrices,varPowerAutomateOutput.ZonePrices)

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard