OnVisible Trigger in Canvas App

The OnVisible trigger is a common trigger used in canvas apps, which fires when a screen or a control becomes visible to the user. This trigger is used to perform actions when a user navigates to a screen or when a control becomes visible after being hidden.

The OnVisible trigger allows you to specify actions that should be performed when a screen or control becomes visible. For example, you might use the OnVisible trigger to initialize variables, to load data from a data source, or to show or hide certain controls based on some condition.

To use the OnVisible trigger in a canvas app, you first need to select the screen or control that you want to use it with. Then, in the formula bar, you can enter a formula that defines the actions that should be performed when the screen or control becomes visible. The formula should start with the name of the screen or control, followed by a period and the OnVisible property.

For example, if you have a screen named “HomeScreen”, you can define the OnVisible trigger for that screen by entering the following formula in the formula bar:

HomeScreen.OnVisible = Set(MyVariable, “Hello, World!”)

In this example, the OnVisible trigger for the HomeScreen initializes a variable named “MyVariable” with the string “Hello, World!”.

The OnVisible trigger is a powerful feature that allows you to create customized and dynamic canvas apps. However, like the OnSelect and OnChange triggers, 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: