I have built a Sharepoint list custom form using PowerApps that only works properly the first time a user opens or edits a SharePoint list item. The next user double-clicks on another list item and this time the OnStart() nor OnVisible() are executed in PowerApps. I have crucial code on the OnStart() event that initializes multiple variables (i.e., Set(x,y)) based on the retrieved user's role. The role is retrieved from another list in sharepoint via a lookup and that works well however those variables drive further Form's logic to hide certain fields or enable a different FormMode (Edit vs View, etc) for the user. If the OnStart() doesn't run at the user end up with a role that doesn't belong. Moving all that initialization code to the OnVisible() of the form didn't work either as the OnVisible() is only execurted once as well.
Is there another event I should be using in PowerApps for such global initialization code?

Report
All responses (
Answers (