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 / Trouble with returning...
Power Automate
Unanswered

Trouble with returning Compose value back to Canvas app

(0) ShareShare
ReportReport
Posted on by 287

I have a compose action that returns the following:  I need to get this to my canvas app, but when I try a ParseJSON on it, and supply this as the schema design it gives me an error.

[
{
"Client": "Alburys Nassau",
"Item": "180 Value Cap Dads Cap",
"PO": "2024008"
},
{
"Client": "Alburys Nassau",
"Item": "50 Custom Rubber Mouse Pad",
"PO": "2024009"
},
{
"Client": "Cryptic Vector, LLC",
"Item": "48 15oz Bistro Mug (Matte Black & Glossy White)",
"PO": "2024001"
},
{
"Client": "Lux Inks | Memorial Care",
"Item": "1000 ¾\" Athletics Lanyard with Lobster Claw Closure",
"PO": "2024002"
},
{
"Client": "Trax Plus",
"Item": "50 Richardson 112 Bandit caps with Patch on the side",
"PO": "2024003"
},
{
"Client": "Waypoint",
"Item": "160 RF Series Double Ring Pen - rubber finish matte blue pen",
"PO": "2024004"
},
{
"Client": "Asphalt Doctors",
"Item": "150 Sport-Tek® Men's Long Sleeve PosiCharge® Competitor™ Tee",
"PO": "2024005"
},
{
"Client": "Lux Inks | Memorial Care",
"Item": "1000 Foam Stress Reliever Balls",
"PO": "2024006"
},
{
"Client": "Illinois Oil Marketing Equipment, Inc",
"Item": "500 Touchscreen Palm Dipped Gloves",
"PO": "2024007"
}
]
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @astrontelstar,

     

    What did you use as Power fx formulas in your Canvas App? And what setup did you use in your flow?

     

    As an example I created the below Canvas app and flow with your data.

     

    1. The cloud flow

     

    compose_canvaspp.png

     

    2. A button which triggers the flow and sets a DataFromFlow variable which parses the json string (from the Result variable of the flow) and converts it to table

     

    datafromflow_example.png

     

    3. A gallery which uses that DataFromFlow table items and refers to for example the PO value of each item in the subtitle1.

     

    thisitemvalue.png

  • astrontelstar Profile Picture
    287 on at

    I think maybe that's the source. Let me show you currently where I am and what I'm getting based on your response:

    Here is my current flow:

    astrontelstar_0-1713306623951.pngastrontelstar_1-1713306637923.png

    astrontelstar_2-1713306652502.png

    astrontelstar_3-1713306663750.png

     

     

    And here is my power app code

    astrontelstar_4-1713306721687.png

    Here is the FLOW Response:

    astrontelstar_5-1713306781114.png

     

     

    But when I look at the variable in my canvas app, it's blank

     

     

  • astrontelstar Profile Picture
    287 on at

    astrontelstar_7-1713306994290.png

     

  • Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @astrontelstar,

     

    It looks like the difference is I am sending the results back as a string. It looks like in your case it is an array.

     

    Can you try the below in your Respond to a PowerApp or flow action to see if that makes a difference?

    string(outputs('Compose'))

     

    sendasstring.png

     

  • astrontelstar Profile Picture
    287 on at

    astrontelstar_0-1713347409195.png

    astrontelstar_1-1713347428720.png

     

    astrontelstar_2-1713347488815.png

     

    I guess I'm puzzled.  Why would Microsoft build a tool that responds back and ONLY give it a string response ?

     

     

     

  • Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @astrontelstar,

     

    I don't know the reasoning behind this being an escaped json string instead of an actual array. For me it is just a known thing which I have learned to deal with. Maybe the PowerApps people/community know about the reasoning behind this?

     

    Btw, Matthew Devaney also has a nice blog about this setup:

    https://www.matthewdevaney.com/power-apps-parsejson-function-get-collection-from-a-flow/

     

  • Verified answer
    astrontelstar Profile Picture
    287 on at

    I was able to get it to send to my powerapp using the Response action instead of respond to.  I with Microsoft had better documentation here.  Thank you!

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 506 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard