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 / Using A Sharepoint Lis...
Power Apps
Suggested Answer

Using A Sharepoint List to Disable Pages

(0) ShareShare
ReportReport
Posted on by 10
Greetings, 
 
I am trying to build a fairly unique circumstances, but keep running into problems, and hope that this community can help. 
 
I have a page of my PowerApps with Toggle Switches that turns on and off (Yes/No Field) in a SharePoint List. That part works great, when I turn on or off the toggle, it updates the Sharepoint List.
Now, I am trying to use 'IF/THEN' type statements to turn 'DisplayMode' and/or 'Visible' to True/False based on those toggle switches. 
 
Two problems seem to exist:
1) The 'Title' Label and the 'Yes/No' Field are different columns, so I'm not sure how to say, "IF Location1 (Title) is marked 'Yes' (Yes/No Field), THEN ..."
2) I am trying to use the IF/THEN Statement outside of a Gallery or Form, so 'ThisItem' doesn't seem to be a viable option. 
 
The end goal is that I can turn on or off a toggle for a Location, and it will display that location in the Main Menu Page, and a few Internal Buttons that will link to that screen.
 
Thoughts?
Larry French
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Any Visible property is simply the toggle value (both are Boolean values and therefore translate directly). So if the Visible of a Control is 
    Toggle1.Value
    then it is visible when the Toggle is on and not visible when the toggle is off. If the toggle is outside the gallery, it will affect the same control in every record, but only the relevant record if the Toggle is in the Gallery.
     
    For DisplayModeusing Edit and View as the options 
    If(
       Toggle1.Value,
       DisplayMode.Edit,
       DisplayMode.View
    )
    Is this what you are trying to do ?
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • Suggested answer
    BriannaReddick Profile Picture
    25 on at
    I think using a lookup() function may assist with your problem. Especially when working outside of a gallery or form, you will need a way to reference the specific record you want the Yes/No to come from. If you expect more than one record to come back you would use a Filter() expression instead but I don't think that is what you would expect in this scenario.

    Here is the link to how documentation on using LookUp : https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-filter-lookup
     
    Based on the size of  your list you could also consider using a collection and on change of your toggle button add or remove that item from the collection then use that collection as the menu listing, this would be faster than always looking up records from the datasource. 
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard