This is what I am trying to do, I have a submit button and on the DisplayMode property of the button I am trying to:
If the logged in user is Reviewer4, the button should be clickable (edit), else it should be disabled for all other users. I can get this to work.
But when Reviewer4 clicks the button to submit the form, I have another variable vWait, which needs to disable the button even for Reviewer4 , until it successfully submits or if it fails, I can't get the syntax correct to cater for 2 different if statements:
If( VarUser = Reviewer4, DisplayMode.Edit, DisplayMode.Disabled);// semi colon or comma and it complains If(vWait, DisplayMode.Disabled,DisplayMode.Edit)
Solved! Go to Solution.
Yes Thats correct, once vWait is true, the button should become disabled, and no it would not affect anything else... as the button is only clickable to Reviewer4, but from the code, i understood it as though there 2 conditions to be met for the function to kick in?
I've just had a thought,
if put the following on the Visible property of the button, then only this user will see the button:
VarUser = Reviewer4
Then on the DisplayMode of the button I can simply put:
Hi @Lefty ,
Without seeing the rest of your logic, yes this should work. My previous thought probably would as well as once vWait became true (on the first click), the DisplayMode of the button would be Disabled
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights