Here is the Items property for the Gallery:
Sort(
Filter('IBC Checklists', Completed = Text(CompFilter)),
Created,
SortOrder
)
I have a button on the page for debugging and it changes CompFilter to "true" or "false". I know that works because I also have a label that shows the current context.
I've also included a screenshot that shows that PA understands the context changing. It's "true" in the current image.
But the gallery doesn't change when I click the button and flip CompFilter back and forth. I was originally comparing Completed = CompFilter directly rather than converting to Text first and that didn't work either.
I'm very stumped.
Hi @DCHammer
You can store a Boolean directly into CompFilter by removeing the dobule quote "".
So it would look like::
Set(CompFilter, true);
UpdateContext({CompFilter: true}); // If you use UpdateContext
If you have any questions or feedback, please let me know. Have a great day! 😊
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
Here is the answer for those following along. You need to convert the text in the CompFilter variable to a Boolean.
Sort(
Filter('IBC Checklists', Completed = If(CompFilter = "Yes", false, true)
),
Created,
SortOrder
)
Ignore the fact that CompFilter switched from true/false to yes/no. I switched so it was clearer to me which I was setting versus what's in the list.
Thanks again for attending DC's PowerApps for Dummies. 😄
Oh I understand my own problem now. I'm trying to compare Completed (which PA sees as a Boolean because it's a Sharepoint Yes/No column. Now I just need to figure out how to compare.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional