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 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:
I have the same question (0)
  • Verified answer
    JasonZF Profile Picture
    572 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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard