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 / Powerapp Gallery selec...
Power Apps
Unanswered

Powerapp Gallery selecting radio button with IF statement

(0) ShareShare
ReportReport
Posted on by

I am having a hard time with this one, I will explain it the best I can. I think the way I am looking at the problem may be the issue.

 
Hollie03161_1-1719406797256.png

 

I have a gallery (it is from a parent gallery) and within that gallery each line has a check box. Once I load all the data from that line into my other system I then add details to that specific line, this tracks my progress. I add a node and workload name. I type this information into my inputs, check the box next to the line it applies and then select my set button. Once I select "Set" it adds the node and name details to the gallery (Patches to collection) and then the box disappears so I know it is completed. The other feature I have is when the check box is selected the line highlights for a visual aid (the gallery can be a single line or dozens of lines and we needed a visual aid to for tracking). Once they have all been "Set" the input boxes on the right disappears and a complete button appears. I select complete and patch my collection out to my SP lists.

 

The issue: There are times when there are numerous lines but they all get the same data "set". I want to be able to select my "Select/Deselect" icon and either select or deselect all the items that have NOT been set. Currently when I select the icon it is highlighting everything which means it is selecting the entire gallery.  I tried using the visible code for the check box as my filter option within on code but it errors. How do I only select all the items from my gallery that have not been "set" yet?

Side note: I will be doing this on two pages as there is another page that records different data as it goes through that departments process.  That page is working the same as this one. 

 

Hollie03161_2-1719407009435.png

 

Here is the coding:

Page:

Onvisible: 

ClearCollect(
    colltempNodeWKLD,
    AddColumns(
        Filter(
            'Special Event Request Post Detail',
            RefID = Text(varRecordG3.ID)
        ),
        IsChoosen,
        false
    )
 
Gallery Control:
Items:  SortByColumns(colltempNodeWKLD, varSortColu, If(varSortDirect = "Ascending", "Descending", "Ascending"))
 
Check Box in Gallery:
Deafult: ThisItem.IsChoosen
Oncheck: Patch(colltempNodeWKLD, ThisItem, {IsChoosen:true})
OnSelect: If(ThisItem.IsChoosen = true, {IsChoosen:false}, {IsChoosen:true})
OnUncheckPatch(colltempNodeWKLD, ThisItem, {IsChoosen:false})
Visible: If(varPostID=ThisItem.ID, false, true) And If(IsBlank(PDGNodeLabel_WKLD.Text), true, false) And If(ESStatusLabel_WKLD.Text = "Workload Completed", false, true)
 

 

Categories:
  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    @Hollie03161 

    Hi I am going to ignore your side note, one thing at a time.

     

    Just so I am clear, what defines whether a line is considered "set" or not? Is there some value you set in the collection?

     

    Also, you said 

    I want to be able to select my "Select/Deselect" icon and either select or deselect all the items that have NOT been set

     

    So you are saying, you have a checkbox that tells you which things are actually set (and it essentially is unclickable when that line is complete).

     

    But you want ANY row in the Gallery that gets checked to show ones that are set or not.

    But what if you have 4 rows that go together

    And you check row 3

    then you check row 2 

    and then you uncheck row 3

     

    This is what I am not following. Are all the lines in there for the same "thing of details"?

     

    I get that you want to use a checkbox to say something is done. But you shouldn't use the same thing to check or uncheck other lines. You should have a single, out of the gallery checkbox that you check and it highlights or unhighlights


    But if you are saying that in this gallery you have 1-M lines for item A and also for item B and item C then still, you should select a row, then click a button OUTSIDE the gallery that highlights ANY rows that are part of the selected row's group and click it again to dehighlight

     

    If you did that and if can tell me how to know which ones are are part of what, then you can either

    using a 

    ForAll(GalleryName.AllItems, Filter(GalleryName.AllItems, FieldX = Set and FieldY = Nope) 

    do whatever here

    );

     

    Or go to the Galleries Template Properties and set the highlighted there based on a variable like

     

    Click the Button
    Set(TurnHighlightsOn, true)
    
    Click Again
    Turn(HighlightsOn, false)
    
    Turn On/Off Highlighting IN the Gallery TemplateFill Property
    
    If(TurnHighlightsOn,
     If(ThisItem.Set = true, SetColorHere, SetDefaultHere)
    ,
     SetDefaultCOlorHere
    );


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard