I have a gallery whose items I am currently filtering by a dropdown. I added a conditional statement to filter the items based on a security group. If a user is part of a specific security group, I want to filter the items to a specific dropdown value. Everything works fine, unless I want to give this security group the ability to show all items. The dropdown is populated by a Collection, which is populated by a Choice SP column. I had to place the Choice column into a collection so that I could set the first value to Blank() to allow users to see all items.
My current formula is as follows:
If(IsUserAdmin,
Filter(Listname, ChoiceField.Value="Status A" Or ChoiceField.Value=dropdown.Selected.Value),
Filter(Listname, dropdown.Selected.Value=Blank() || ChoiceField.Value=dropdown.Selected.Value))
The problem is, if I add "Or ChoiceField.Selected.Value=Blank()" to my true statement, the gallery shows all items because the default value is Blank(). Is there a way to set the Choice Field to a specific value by default using the conditional statement above? So far, I've set the default value on the dropdown to a variable, and then attempted to write the If statement on the 'OnVisible; property as follows
If(IsUserAdmin, Set(varRole, Status A))
This caused an error. Any ideas on how to make this work?