Dear PowerApps Users,
I have a screen where there is a option for users to enter comments, and a submit button having a patch formula as below (to write back to a SharePoint List, once the submit button is pressed) :
ForAll(Collection1,
If(
LookUp('Approvals Extract',UniqueID= Collection1[@UniqueID],"OK") = "OK",
Patch('Approvals Extract',LookUp('Approvals Extract',UniqueID=Collection1[@UniqueID]),
{'Manager1 Approval Status':"Query",'Manager1 Rejected Reason':TextInput1_4.Text})));
Clear(Collection1)
Once the user press "submit" the following should happen
1) The text entered in textbox should clear
2) The user should be redirected to the main screen "SCREEN1"
I tried to add the navigate functionality within the "If" loop but it keeps giving syntax errors. Please help
@Anonymous
If(!IsBlank(
LookUp(
'Approvals Extract',UniqueID= Collection1[@UniqueID],"OK"
)
), Patch(
'Approvals Extract',
LookUp(
'Approvals Extract',UniqueID=Collection1[@UniqueID]
), {'Manager1 Approval Status':"Query",
'Manager1 Rejected Reason':TextInput1_4.Text}
),
false
);
If( // check if there were any errors when the patch was submitted
!IsEmpty(
Errors('Approvals Extract')
),
Notify("submission failed", NotificationType.Error), // if true, show any error message
Clear(Collection1)
)
User | Count |
---|---|
256 | |
111 | |
95 | |
48 | |
40 |