Hello,
I am seriously struggling to get a button visible only if a user if found in a specific M365 Group.
I have created variables and a collection and associated these to the button visible property "Only one member will ever exist per group"
App >> OnStart>>
Set(VarAdmin, false) ; Collect(ReviewerGroups, {AMMembers: Office365Groups.ListGroupMembers("MYGROUPID").value.mail}
Button1 >> Visible >>
VarAdmin
My Issue is in the below formula for:
Screen1 >> OnVisible >>
If(
IsEmpty(
Filter(
ReviewerGroups,
Lower(User().Email) in Lower(AMMembers.mail)
)
),
Set( VarAdmin, true ),
Set( VarAdmin, false )
)
I can confirm that the values appear in the collection on load as below:


I am not getting errors, The Screen>>Onvisible always sets the VarAdmin variable to true ignored the If statement
Any help or advise would be hugely appreciated.