Understanding Access App Scope in Power Apps Components: Create App-Specific Solutions.

Notes from my research on the “Access App Scope” custom component of Power Apps.

Access app scope

Custom components are not accessible to app-side values or data sources so that they can be used by any app and still work.

But when you want to create a custom component to be used only in one application, this constraint becomes unnecessary.

In such cases, the custom component property “Access App Scope” can be used to create an app-specific custom component.

When access app scope is turned on

With access app scope turned on, custom components can do the following.

  • Access to global variables and collections
  • Access to controls and components
  • Access to tabular data sources (Dataverse, SPO lists, etc.)

We will look at the operation for each of these.

Accessing Global Variables

For example, if you declare a global variable or collection in your app,
you can access these values from custom components with access app scope turned on.
However, context variables are not accessible from custom components.

I think the behavior of this app is because the custom component must work regardless of which screen it is placed on, so it cannot work based on values that are dependent on the screen.

Access to controls and components

Also, when you add controls to your app,
you can access those controls from your custom components.

Access to tabular data sources

Finally, when tabular data sources such as SPO lists or Dataverse are added to the app,
the custom component can access these data sources as well.
* Of course, custom components with access aprescope turned off will not be able to access the data source.

Turning on Access App Scope allows custom components to access app variables and data, which is very useful when creating app-specific components such as headers and side menus.

Related Articles

In addition: Official link

コメント

Copied title and URL