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 / Filtered Gallery to on...
Power Apps
Answered

Filtered Gallery to one long string

(0) ShareShare
ReportReport
Posted on by

Say I have a filtered gallery (Name: MyGallery) and it looks like this.. 

 

 Good / BadNameAddressBlah
Item 1Good123456789
Item 43Badabcdefghi
Item 56Goodjklmnopqr

 

I would like to simply have a two strings saying this:

 

Good

- Item 1 - 123 - 456 - 789

- Item 56 - jkl - mno - pqr

 

Bad

- Item 43 - abc - def - ghi

 

Im able to get columns of info through concat function but not understanding how to combine each row.. forall or something similar seems to be the right way of doing this but Im not having any luck

 

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @jimi_hendrix ,

     

    The easiest way is to use the AddColumns function with string interpolation:

     

    AddColumns(
     DataSource,
     "LongString",
     $"{Title} - {Name} - {Address} - {Blah}"
    )

     

    This adds a column (LongString) to each item (=row) that has the values of the mentioned columns in a combined string. If you then replace the data source code in your Concat function with this and have it reference the "LongString" column, you should get the result you are looking for.

  • jimi_hendrix Profile Picture
    on at

    @BCBuizer ,

    This definitely sounds like the shortest putt to get whats needed. I do have some follow-up questions though.

     

    Where is the best place to put this command? I would like to have this function occur in the background all the time. Ive temporarily put in into the OnSelect field for a random button during troubleshooting but it throws an error of "invalid argument type"

     

    Never saw the use of the '$' before.. what does that allow you to do?

  • jimi_hendrix Profile Picture
    on at

    So messing with this some more.. I changed the datasource from a filtered gallery (which is what I want), to the overall data source.. now it doesnt throw the error any longer but cant seem to find the newly added column.. 

  • jimi_hendrix Profile Picture
    on at

    Thanks for your help.. Got it all figured out.. Put the AddColumn in the Items of the filtered gallery and then as you said concat the added column in the label

     

    And as far as the '$', never saw this but removing it provides the title of column and not the contents of the column.. 

     

    All good.. have a good rest of the day!

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @jimi_hendrix ,

     

    The $ allows for string interpolation, making it easier to combine static and dynamic strings.

     

    https://powerapps.microsoft.com/en-us/blog/power-fx-string-interpolation-index-function-and-randbetween-function/

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 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard