Announcements
Hi @Veblitz ,
I assume the DisplayMode of those buttons is set by some conditions. Since it may take some time to load the data to verify those conditions, there may be a delay in enabling those buttons.
Can you please share how the mechanism works to enable those buttons to see if there is a possibility to optimise?
Thanks a lot for your valuable inputs.
Here is the details:
I am using below code in my home screen visible property
Set(CheckUser1, AuthenticateHR.Run(User().Email));Set(IsVisible1,If(Lower(CheckUser1.checkaccess) = "true",true,false)
)
Indeed first the AuthenticateHR flow has to run before the button is enabled. I'm not sure how this flow works, but perhaps you can look into alternatives there. An idea may be to move this code to the App.Onstart property so it only triggers once when starting the app instead of every time the user goes to this screen.
Also, the IsVisible1 variable is redundant. You can achieve the same result by setting the Button.DisplayMode property to:
If(CheckUser1,Edit,Disabled)
After this change you can delete all but the first line of your current code.
I modified as per your inputs and below is the error I am facing with
Apologies, try:
If(Lower(CheckUser1.checkaccess)="true",Edit,Disabled)
Myflow details
expression in condition
Error got fixed
But still buttons are taking a while to get activated
It takes a while for the flow to complete, hence the delay.
May I ask what information is retrieved from SharePoint? Perhaps there's a faster alternative that can be done from Power Apps itself.
Actually, I got SharePoint HR groups and whoever got access to HR SharePoint group then they should access home page button
Home page consists of Add details button and HRdashboard so basically if Hr logins then those buttons should be visible
Hi @Veblitz,
In that case this tutorial provides another option which will be much faster where you can check if the current user is member of a sharepoint group: https://www.youtube.com/watch?v=dIzOAbMjN7g
If you set this up, you can get rid of the flow and reduce the delay in button activation considerably.
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 477
WarrenBelz 341 Most Valuable Professional
11manish 317