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 / how to Concat selected...
Power Apps
Answered

how to Concat selected toggles within a gallery

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

All,

I have been struggling to code the following scenario. I consider myself a newbie and my knowledge of powerapps is very limited. So, any hint is appreciated.

 

I followed the following posts - which helped me, however requirements chagned. 

 

https://powerusers.microsoft.com/t5/General-Discussion/How-to-get-value-of-selected-checkbox/m-p/246723/highlight/false#M72413

https://powerusers.microsoft.com/t5/General-Discussion/Checkbox-or-Toggle-edited-by-and-when/td-p/156676

 

I have a galllery that is coneccted to a SP table with 2 columns

Taks Name, Task Ticket. 

1)  I need to findout which toggles are true representing each task and Task Ticket (if i am using ForAll). How can I identify those toggled items (Toggles dont seem to have "name" property associated with them) and couldn't identify them.

2) how can I concenate them to make a single long string Outside of the gallery that can be displayed in a text box. I tried to use Collection in case, one of the toggles are unselected, however my collection keeps increasing. Couldn't get remove working.

 

Any hint / example is greatly appreciated. 

 

thanks

on OnSelect of the toggle within the gallery 

If( Toggle4.Value = true,
Collect(CheckCollection, 
{
 TaskName: ThisItem.Name
}
))

I also have 

ForAll(
 Filter(Gallery1.AllItems, Toggle4.Value = true),
 Collect(CheckCollection,
 'Task Name'
 )
);

 

 

 

 

 

 

 

 

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Can you explain what you are referring to with the toggles?

    You mentioned you had two columns - Task Name and Task Ticket

    So what is the toggle and what is it tied to?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Randy,

     

    Thanks for replying. basically it is a set of tasks that have to be tested every morning. If one of them is failed, we need to toggle the corresponding toggle control to failed / false. similar to the first link except with toggle instead of checkboxes. How can I show what is selected outside gallery using label and if unselected, drop it from the selected list / label value. 

    do I make any sense? 

    Guldf_Man

     

    Toggle.jpg

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous

    Ok, so you mention two fields/columns - Task Name and Task Ticket

    I am going to assume from that the toggles are not part of any field or column of importance.

    Also, you only mentioned a single string for all the items checked - I am going to assume a comma separated list of Task Name - Task Ticket

    Also assuming that Task Ticket is a text column.

     

    With all those assumptions, what you are looking for is this formula:

    Concat(Filter(yourGalleryName.AllItems, yourToggleName.Value), TaskName & " - " & TaskTicket & ", ")

    Substitute your control names and your Column names in the red items above.

     

    That should give you the string of all selected (checked) items in your Gallery.

     

    Hope that helps.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you Randy. continuing with my dev till another issue pops....

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard