0

I have a PowerApps customized form. On that form I have some buttons. I want to be able to hide those buttons if someone is not in the FinanceMgrs list. I have set a global variable in the OnStart event of my App. The formula is:

Set(varIsAdmin,If(!IsBlank(LookUp(FinanceMgrs,Title=User().Email,Title)),true,false))

(I got the formula from one of Shane Young's videos - it works). What is happening, though, is that on the form, even if I remove myself from the FinanceMgrs list, it keeps on evaluating to true and showing the button. What am I doing wrong here?

1

Set the OnEdit property of the SharePointIntegration control to following:

Refresh('YourSPList');   /* <-- add this formula */
ResetForm(SharePointForm1); /* <-- add this formula */
EditForm(SharePointForm1)

Set the OnNew property of the SharePointIntegration control to following:

Refresh('YourSPList');
ResetForm(SharePointForm1); /* <-- add this formula */
NewForm(SharePointForm1)

Set the OnView property of the SharePointIntegration control to following:

Refresh('YourSPList');
ResetForm(SharePointForm1); /* <-- add this formula */
ViewForm(SharePointForm1)

Then re-publish your custom form to your SP list, then check if the issue is solved.

| improve this answer | |
0

First, thanks for the response about refreshing my form. As it turned out, I was just screwing up the formula for the !IsBlank. The correct formula should have been

!IsBlank(Lookup(MyList,Title=User().Email,Title))

THAT evaluates to true or false. Which is what I needed.

| improve this answer | |
  • Thank you for your sharing, you could mark you reply as answer. – Julie_MSFT May 20 at 0:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.