PowerApps custom form- global variable seems cached
-
08-02-2021 - |
문제
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?
해결책 2
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.
다른 팁
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.