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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Visibility of button b...
Power Apps
Unanswered

Visibility of button based on collection list

(0) ShareShare
ReportReport
Posted on by 151

Currently trying to figure out how to make a button visible based on a what is in my collection list. I have a gallery that is pulling choices from a SharePoint list and creating multiple checkboxes. When a checkbox is selected, that title is sent to the collection list. 

I need a button to be only visible if a certain checkbox is selected. 

 

For example, in my gallery I have 4 checkboxes. Checkbox one is pH, I select pH. I now have 1 entry in my collection ( title = pH)

 

Below is what I have so far (which could be completely going down the wrong hole) but I feel like I am missing a small piece to it.

Visible -

 

If

(
LookUp(colListofAnalytes, Items = "pH").Title
,
true,
false
)

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Hi, you may need to post your code that collects the data to a collection but you should be able to us a logical formula to display the checkbox. For example,

     

    In your example i would change the onselect to collect the whole record, rather than the text, the reason being is if you have multiple records that have pH selected you would need to identify each record using its ID. 

     

    For the checkBox OnSelect within the gallery i would add  Collect(Col_Selected_pH,ThisItem). this will leave you with a collection containing all records where the pH checkbox has been selected. 

     

    Then for checkbox2 visibility, for example, change the visible property to ThisItem.ID in Col_Selected_pH.ID

    this will return true if the record exists in the collection. to set it to false add ! in front e.g. !ThisItem.ID in Col_Selected_pH.ID

     

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Jakegolden ,

     

    Basically @C-Papa has explained quite clearly. For your codes in Visible, I just want to add something: you will need logical test as the first parameter in If statement, based on the test result the statement will return true value or false value:

    If(
     !IsBlank(
     LookUp(colListofAnalytes, Title = "pH")
     ),
     true,
     false
    )

     

    But logical tests would return true/false, so above codes could be simplified to:

    !IsBlank(LookUp(colListofAnalytes, Title = "pH"))

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Jakegolden Profile Picture
    151 on at

    Thank you both, works perfectly!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard