Access Global Variable and Collection in Component

Access Global Variable and Collection in Component without using Input and Output Property


Problem statement

We can use collection and Global Variable in Power Apps Components using Input / Output Property. Without using this property, we can able to access Global Variable and Collection in Power Apps Components.

Declare Collection “ColMenu” on App on Start property. Collection having role and screen name as column.


Create a New component in Power Apps and rename it as “Menu Component”. Add Gallery to the component. And Map the Data Source to the Gallery control as “ColMenu” using the Items property of the Gallery Control.


Create a New Component and rename it as “Header Component”. Add a Dropdown to it. And declare Global variable in on Select Property of the Dropdown.


Resolution

Using Input / Output Property we can access the Collection and Global Variable in Power Apps Components.

We need to enable the “collection access in Component Scope” in the Settings.



After enable the “Collection access in component scope”. Close the app after saving. Reopen the App.

  1. Short words about the resolution
  2. Detailed step by step explanation of the resolution
  • Screen shots

Once you enable the Button. You can access the collection in components.