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 / Can I turn table value...
Power Apps
Answered

Can I turn table values into an array of strings?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a gallery table with checkboxes used to collect id's. The id's will then be put into a query to call our API. The empty collection is initiated on page load with: 

 

ClearCollect(selectedIds, []);

 

The OnSelect for the checkbox is:

 

Collect(selectedIds, ThisItem.Id);

 

I get a table with :

 

Value

123
456

 

I then have to create a query string like so:

 

CustomConnectorCall.getData(query:"query{GetData(where:{ids:{eq: ["123", "456"]}}){...}}")

 

I know I'll have to do some form of string concatenation but how can I parse through a collection of unknown quantities to add to this string? In code, I would just write a for loop but I'm not sure how to do that in PowerApps. Thanks!

Categories:
  • Verified answer
    JasonZF Profile Picture
    574 on at

    The Concat() function is exactly what you are looking for. This should work:

     

     

     

     

    Concat(selectedIds, Value & ",")

     

     

     

    EDIT: The only issue is there will be a trailing comma at the end. And I now see you custom string you need is a little more complex. Perhaps something like the below.

     

     

     

    Concat(selectedIds,Char(34) & Value & Char(34) & ", ")

     

     

     

    Take a look here for the Microsoft article about Concat() and Concatenate(): Concat and Concatenate functions in Power Apps - Power Platform | Microsoft Learn

  • aec2018 Profile Picture
    Microsoft Employee on at

    @JasonWS Yup! That worked for me. I was able to add the quotes around each item after reading the docs. I wasn't aware concat would smash a table like that but it works perfectly. Thanks!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard