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 / Disable checkbox based...
Power Apps
Unanswered

Disable checkbox based on filtered lookup

(0) ShareShare
ReportReport
Posted on by 81

I have a checkbox that I need to disable based on multiple values in a library. Here is my scenario. I have a SharePoint library (SPLibrary) with a column named "Category". This column is used to store attachments for my app. For example, on submission could be for a category of "Paper". Another could be for a category of "Products". The variable, varSubmissionID, is set on app start is is basically the submission from the current logged in user. That is how I am matching up records.

 

This works fine for the first category but it is not looping through the entire library.

If(LookUp(SPLibrary, ID=varSubmissionID).Category<>"Product" && LookUp(SPLibrary, ID=varSubmissionID).Category<>"Paper",Disabled,Edit)

 

I need to be able to disable this control if both conditions are not met. Is this possible?

Categories:
I have the same question (0)
  • AmirBakht Profile Picture
    262 on at

    What is your column type? For example if it is a calculated field, you may need to get its Value rather than directly comparing with text. Test by setting up a variable and looking into the value you get. 

  • BigE Profile Picture
    81 on at

    @AmirBakht , it's a text column

  • AmirBakht Profile Picture
    262 on at

    Can you give more info on what you mean by looping through the library? Your formula works on a single item entry for the same column. LookUp also gets you only a single entry even if it matches multiple values, though I believe you are looking at a single entry here since ID is being queried. It will lookup the first entry it finds where the ID is equal to your variable then disable the control if the value is anything other than Paper or Product and keep it editable if it is Paper or Product. I'd still say set the value to a variable and check, it will give you an idea of what value you are testing and you would also reduce 2 queries to 1 query.

  • BigE Profile Picture
    81 on at

    @AmirBakht, by looping through I mean look at all items in the library and if any item with category column that matches "Paper" AND "Products", disable the control. It's looking at the first entry and I can see that result so the formula is satisfied at that point. I need for it to compare both "Paper" AND "Products"

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
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard