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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Tip! - Building a vali...
Power Apps
Answered

Tip! - Building a valid JSON array from a PowerApps collection (to pass to Flow as an example)

(5) ShareShare
ReportReport
Posted on by 273

I struggled with this a little bit myself, and I know it's one of those questions that people come up against often. The desire to take Collection data and pass it to Flow as a fully formed JSON array that can be easily worked with in Flow. I came up with the below solution which works really well for me, so I thought I'd provide it in case anyone else needs it 🙂 

 

I have a Gallery collection which has checkboxes. I want to add each checked item to a JSON array prior to passing it to FLOW. Below is my formula for this: 

 

"{" & Mid(Concat(groupStores, ",""" & store_id & """"),2,5000) & "}"

Which produces the following: 

 

{
 "228",
 "721",
 "328",
 "658",
 "655",
 "415",
 "427"
}

Adding or removing from the string correctly re-builds the string with the right quotes and commas etc. Hopefully this helps someone else who needs to do this 🙂 

Categories:
I have the same question (0)
  • timl Profile Picture
    37,248 Super User 2026 Season 1 on at

    Thanks for sharing this @JamesM!

  • Mike8 Profile Picture
    1,330 on at

    Hello,

    We also use it 🙂
    To avoid the mid function you can use the following instead
    "{"&Concat(groupStores,""""&store_id&"""",",")&"}"


    Also you can set the column names
    "{"&Concat(groupStores,"""store_id"":"&""""&store_id&"""",",")&"}"

    You can send a table with as many columns as you want from powerapps to flow 🙂
    "["&Concat(groupStores,"{""store_id"":"&""""&store_id&"""}",",")&"]"

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for sharing @JamesM! This a great tip that help out future users. Have a great day. 

     

    @Anonymous

  • CU07080701-0 Profile Picture
    on at

    Just in case anyone is searching through this forum, this solution has been superseded by the JSON function

     

    https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-json

  • Dawidvh Profile Picture
    1,346 on at

    Correct @johnnyshield , the new JSON function works like a charm.

    See below video if anyone hasn't used it yet.

    https://youtu.be/HLdOO4JPZ2I

     

    Dawid van Heerden
    Follow on Twitter: @davestechtips
    Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard