Hello,
I would like to make a button visible only if the user of the app exsist in a particular column of a data source. Currently I have it working by hard coding the names.
Button Visible property set to function:
If (User().FullName="Bob Smith"Or User().FullName="Jane Doe"Or User().FullName="John Doe",true,false)
The data source with names I would like to use is: Attendants
The column of full names is: Name
Your suggestions and tips are greatly appreciated!
Thanks!
Solved! Go to Solution.
Hi @amelch,
As @Drrickryp suggested, please first collect the needed table into a local variable, together with the User() function, so the OnVisible property of the Screen should be:
Set(UserTable, Attendants.Name);Set(CurrentUser, User())
Then for the filter to work, switch the formula as below:
If(CurrentUser.FullName in UserTable.Name, true, false)
Let me know if it works for you.
Regards,
Michael
I believe that this will do it.
Make the OnVisble property or the screen: ClearCollect(user,Filter(Attendants,User().FullName="Bob Smith"Or User().FullName="Jane Doe"Or User().FullName="John Doe"))
Make the Visitble property of the button: If (!IsEmpty(user),true,false)
Hi @amelch,
This blog post could help: https://powerusers.microsoft.com/t5/General-Discussion/Show-Hide-Button-based-on-email-addresses-in-...
Rick
Hi @amelch,
As @Drrickryp suggested, please first collect the needed table into a local variable, together with the User() function, so the OnVisible property of the Screen should be:
Set(UserTable, Attendants.Name);Set(CurrentUser, User())
Then for the filter to work, switch the formula as below:
If(CurrentUser.FullName in UserTable.Name, true, false)
Let me know if it works for you.
Regards,
Michael
Sorry for the delay, but I had a chance to work on this some more today and it worked great! Thanks for the help.
User | Count |
---|---|
139 | |
129 | |
75 | |
74 | |
69 |
User | Count |
---|---|
221 | |
135 | |
78 | |
58 | |
56 |