App-Level Triggers in Canvas App

App-level triggers in canvas apps are events that can be used to perform specific actions or automate tasks in response to certain user interactions or system events within the app. These triggers are available for use across all screens within the app and can be set up from the app settings.

There are several types of app-level triggers in canvas apps, including:

  1. OnStart: This trigger runs when the app is launched and can be used to perform any initialization tasks, such as setting default values or initializing global variables.  
  2. OnVisible: This trigger runs when a screen becomes visible to the user and can be used to perform actions specific to that screen, such as fetching data from a data source.  
  3. OnHidden: This trigger runs when a screen is hidden from the user and can be used to clean up any resources or data specific to that screen.  
  4. OnTimerEnd: This trigger runs when a timer that was previously started using the Timer control on a screen has ended.  
  5. OnSelect: This trigger runs when a user selects a control, such as a button or a gallery item, and can be used to perform specific actions based on the user’s interaction.  
  6. OnChange: This trigger runs when a user changes the value of a control, such as a text input or a dropdown, and can be used to perform actions based on the user’s input.  
  7. OnReset: This trigger runs when a user resets a form or control, and can be used to clear any data or reset any values as needed.  

To set up an app-level trigger in your canvas app, follow these steps:

  1. Open your canvas app in the Power Apps Studio.  
  2. Go to the File menu and select App settings.  
  3. In the App settings pane, select the Events tab.  
  4. Select the type of event you want to set up a trigger for, such as OnStart or OnVisible.  
  5. Choose the action you want to perform in response to the event, such as running a formula or navigating to a different screen.  
  6. Save the trigger and publish your app to make the changes effective.  

Once the app-level trigger is set up, it will run automatically in response to the specified event, allowing you to automate tasks and provide a more user-friendly experience within your canvas app.


Posted

in

by

Tags: