Hello,
I understand the OnSuccess of a form does not work if the Patch() function is used to submit the form. I would like to notify the user if the form is submitted successfully even when using patch. How can I check this and notify with their result?
Here is the patch in my Onsubmit
(Just looks up title to see if project already exists or not)
I would like to navigate(successSceen) when submission is successful or display error message if not without leaving the screen.
Solved! Go to Solution.
To be a bit more informative, use the Errors() function after the patch:
Patch('Project Excellence'...);
If( // check for errors
!IsEmpty(
Errors('Project Excellence'
)
), // if true, show any error messages
Notify(
Concat(
Errors(
'Project Excellence'
), Column & ": " & Message
), NotificationType.Error
),
Notify(
"Your submission was accepted", NotificationType.Success
)
)
@CamCov ,
Here is an example it can inspire you:
Set(varRecord, Patch(your_code_here));
If(!IsBlank(varRecord),
Notify("Your request has been succesfully submitted!", Notification.Success),
Notify("Your request was not submitted", Notification.Failure)
);
Hope it helps !
To be a bit more informative, use the Errors() function after the patch:
Patch('Project Excellence'...);
If( // check for errors
!IsEmpty(
Errors('Project Excellence'
)
), // if true, show any error messages
Notify(
Concat(
Errors(
'Project Excellence'
), Column & ": " & Message
), NotificationType.Error
),
Notify(
"Your submission was accepted", NotificationType.Success
)
)
Hi,
I have similar problems with displaying the 'success' when a patch and with formula is part of the submit function.
Where about would I put your example??
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
185 | |
53 | |
41 | |
36 | |
30 |
User | Count |
---|---|
241 | |
81 | |
71 | |
69 | |
65 |