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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtered Gallery to on...
Power Apps
Unanswered

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:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,496 Super User 2025 Season 2 on at
    Re: Filtered Gallery to one long string

    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
    Re: Filtered Gallery to one long string

    @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
    Re: Filtered Gallery to one long string

    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
    Re: Filtered Gallery to one long string

    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,496 Super User 2025 Season 2 on at
    Re: Filtered Gallery to one long string

    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

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 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard