Notifications
Announcements
I have a role table like this:
and I want to set the permission in power apps for a button that only admin can see, and the script APP onsart like below, and the varUser email always show blank , how can I solve this?
@airma It's more likely a permissions issue. You can create a collection and try it out.
Put all the code into the button.
ClearCollect(Role,{User:"Test@aaa.com.tw",Role:"Admin",__Power:"1234567",ssid:"aaaa"}); Set( varUserMail, User().Email ); Set( varAdmin, LookUp( Role, User = varUserMail ).Role = "Admin" )
Hi @airma ,
Have you triggered the OnStart after setting the variable?
Best regards,
u you work with entra id groups?
if yes you can out that in the onvisible of your first screen:
Set( varIsOwner, User().Email in Office365Groups.ListGroupMembers("YOUR ENTRA ID GROUP ID").value.mail );
in the buttons you want to show only to the person who matches this you only put varIsOwner
if you need more assistance let me know
Let me know if my answer helped solving your issue.If it did please accept as solution and give it a thumbs up so we can help others in the community.Greetings
Thank you Jefferni,I just start to create apps and don't know should run OnStart first , after I click this the issue fixed!!
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 739 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 268