cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sal
Level: Powered On

Saving Colllection or Gallery Control values in to Label

I have one Gallery Control with Items or I can also have one Collection column with values, How can I move all of the values to Label Control to display using Concatenate?

Let say I have one Column in CollectionA call Column1, with values 1, 2, 3. In the Label control I want to display them like 123. How can I do that?

 I tried this expressoin Concat(collection1,col_name & """OR""") and output coming like this 1"OR"2"OR" , I need it in this format "1"OR"2"OR"3"

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Saving Colllection or Gallery Control values in to Label

Hi @Sal

 

This formula should carry out what you want.

 

Replace(
  Concat(collection1,"""" & col_name & """ OR "),
  Len (Concat(collection1,"""" & col_name & """ OR "))-3,
  4,
  ""
)

The purpose of the Replace function is to remove the trailing "OR". Perhaps someone here might be able to suggest a more elegant solution.

View solution in original post

3 REPLIES 3
Sal
Level: Powered On

Re: Saving Colllection or Gallery Control values in to Label

I want the values in this formate

"1" OR "2" OR "3"

Super User
Super User

Re: Saving Colllection or Gallery Control values in to Label

Hi @Sal

 

This formula should carry out what you want.

 

Replace(
  Concat(collection1,"""" & col_name & """ OR "),
  Len (Concat(collection1,"""" & col_name & """ OR "))-3,
  4,
  ""
)

The purpose of the Replace function is to remove the trailing "OR". Perhaps someone here might be able to suggest a more elegant solution.

View solution in original post

Highlighted
Sal
Level: Powered On

Re: Saving Colllection or Gallery Control values in to Label

Thanks, I created formula like that below, that is working for me for now to display ("1"OR"2"OR"3") but I will try your suggestion as well.

Mid(Concatenate("""", Concat(collection1, col_name & """OR""")),1,Len(Concatenate( """", Concat(collection1, col_name & """OR""")))-3)

 

 

Thanks alot.

-Sal

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,177)