I have a custom form on Powerapps that i'm using for approvals on SharePoint. The function that I want: is for the form to remain editable by users in order for them to be able to submit items. Then that item is chosen for approval, and I no longer want the datacards to be editable by the approver.
Therefore, I've set a variable named "submittedFlag" and the app sets submittedFlag to DisplayMode.View or DisplayMode.Edit on the following IF Statement: If(IsBlank(ID Number of Item), Set(submittedFlag, DisplayMode.Edit), Set(submittedFlag, DisplayMode.View)
I've put the submittedFlag variable inside the "OnVisible" property of the screen where the form lives. Everything works fine if I manually navigate from another screen to the form screen but the On Visible for the screen doesnt work if you copy and paste the link into the URL and navigate to the app that way.
Any work arounds or words of advice?
P.S. I need the custom form to stay in edit mode, even on view by the approvers (the reason for that being is because, when the approvers hit the "Approve" button, I submit the form, again (instead of Patching it) because I want to trigger a Flow to send out emails, but the flow isn't triggered with the patch function (I believe it's a bug).
Is this a standalone PowerApp using SharePoint as a data source or a PowerApps custom SharePoint list form?
Try adding Navigate to the SharePointIntergration Actions OnNew, OnEdit, and OnView. I think that will tickle the OnVisible and get it to fire.
'The existingfFormula'; Navigate(FormScreen1,None)
HI @Anonymous ,
Based on the issue that you mentioned, I think you have some misunderstanding on the OnVisible property of custom form screen within SP list.
Actually, there are some limits on the OnVisible property of the custom form screen. Please check the following article:
As an alternative solution, please consider put your If formula within the OnNew, OnEdit or OnView property of the SharePointIntegration control.
Set the OnNew property of the SharePointIntegration control to following:
IsBlank(SharePointIntegration.SelectedListItemID), /* <-- Or type SharePointIntegration.Selected.ID */
NewForm(SharePointForm1) /* <-- SharePoitForm1 represents the Edit form in your custom form app */
Set the OnEdit property of the SharePointIntegration control to following:
Set the OnView property of the SharePointIntegration control to following:
Please consider take a try with above solution, then check if the issue is solved.
Check out these cool Power Apps & vote on your favorite!
Check out whats happening in Power Apps
FIll out a quick form to claim your community user group member badge today!
Features releasing from October 2020 through March 2021