ModelDrivenFormIntegration control properties and actions

Canvas apps embedded on model-driven forms contain a special control named ModelDrivenFormIntegration. This control is responsible for bringing contextual data from the host model-driven form to the embedded canvas app.

This topic explains the properties and actions available on the ModelDrivenFormIntegration control.

Property or action Description
DataSource Should be set to the data source connected to the parent table of the host model-driven form.
Automatically set when embedding a new canvas app. When embedding an existing canvas app, ModelDrivenFormIntegration data source can be configured from the canvas app tree view.
The value for DataSource should always refer to the table of the form the app is embedded in. The value shouldn't be filtered or modified in any way.
Item Read-only property that enables the embedded canvas app to access the row from the host model-driven form.
As an example, to get the value of a column with the name accountnumber and display name Account Number, you can use ModelDrivenFormIntegration.Item.accountnumber or ModelDrivenFormIntegration.Item.'Account Number'.
OnDataRefresh The formula in this property is evaluated when the host model-driven form saves data.
Use it to refresh the data source connected to the parent table of the host model-driven form and to perform other actions like setting or updating variables.
As an example, setting it to the formula below will refresh the Accounts data source and set a variable named CurrentAccountNumber to the value of the Account Number column of the current row.
Refresh(Accounts); Set(CurrentAccountNumber, ModelDrivenFormIntegration.Item.'Account Number')
The OnDataRefresh action should only be used to refresh data within the embedded canvas app. We don’t recommend that you use the OnDataRefresh action to save changes within the embedded canvas app. More information: Saving data in an embedded canvas app
RefreshForm Refreshes the data on the host model-driven form.
See Perform predefined actions on the host form for details.
SaveForm Saves the data on the host model-driven form.
See Perform predefined actions on the host form for details.
NavigateToMainForm Navigates the host model-driven form to a main form and displays the specified row.
See Perform predefined actions on the host form for details.
NavigateToView Navigates the host model-driven form to a view.
See Perform predefined actions on the host form for details.
OpenQuickCreateForm Opens the default quick create form for an table.
See Perform predefined actions on the host form for details.
Data Read-only property used by the framework to send some key data from the host model-driven form to the embedded canvas app.
Do not use this property. Use Item to access the row from the host model-driven form.

See also

Embed a canvas app on a model-driven form
Add an embedded canvas app on a model-driven form
Edit a canvas app embedded on a model-driven form
Customize the screen size and orientation of a canvas app embedded on a model-driven form
Perform predefined actions on the host form from within an embedded canvas app
Share an embedded canvas app
Guidelines on working with embedded canvas apps
Migrating embedded canvas apps on model-driven forms created using the public preview release to latest