OnSuccess Trigger in Canvas App

The OnSuccess trigger is a common trigger used in canvas apps, which fires when a form control successfully submits data to a data source. This trigger is used to perform actions when a user submits a form and the data is successfully saved to the data source.

The OnSuccess trigger allows you to specify actions that should be performed when a form control successfully submits data to a data source. For example, you might use the OnSuccess trigger to show a success message, to navigate to a different screen, or to reset the form for another entry.

To use the OnSuccess trigger in a canvas app, you first need to add a form control to your app. You can do this by selecting the Form control from the Controls menu in the left-hand pane of the Power Apps Studio. Once you’ve added a form control to your app, you can define the data source it should submit to and the actions that should be performed when the submission is successful.

To define the OnSuccess trigger for a form control, you can select the control and then go to the OnSuccess property in the formula bar. From there, you can enter a formula that defines the actions that should be performed when the form data is successfully submitted.

For example, if you have a form control named “MyForm” that submits data to a SharePoint list, you can define the OnSuccess trigger for that control by entering the following formula in the formula bar:

MyForm.OnSuccess = Notify(“Data successfully submitted!”, NotificationType.Success)

In this example, the OnSuccess trigger for the MyForm control shows a success notification message when the form data is successfully submitted to the SharePoint list.

The OnSuccess trigger is a useful feature that allows you to create customized and dynamic forms in your canvas apps. However, it’s important to use it judiciously and only when necessary, as too many triggers can make your app slow and difficult to maintain.


Posted

in

by

Tags: