Managing Application State in Power Apps Canvas Apps
Short answer
AB Use collections to hold tabular data and context variables to store selected values across screens in a canvas app.
Question
The app must store selected values across screens and hold tabular data during a session.
You need to manage application state.
Which two components should you use? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Key Takeaways
Distinguish between local session storage (Collections/Context Variables) and external persistence (Data Sources), and recognize that 'Global Variables' is not a valid Power Apps component name.
Learn how to manage application state in Microsoft Power Apps Canvas apps using collections for tabular data and context variables for cross-screen value storage.
Common mistake: Choosing Data Sources because they store data permanently. However, the question asks for state management during a session, which implies temporary, local storage rather than connecting to an external database.
Expert Analysis
The question requires managing application state in a multi-screen Canvas App, specifically needing to store selected values and hold tabular data. In Power Apps, Collections are the primary mechanism for storing tables of data locally within the app session. They can be populated from data sources or manually created and support operations like filtering and sorting, making them ideal for holding tabular data as requested.
For storing single selected values across screens, Context Variables (specifically Global Context Variables) are used. While Local Context Variables only persist on the current screen, Global Context Variables persist throughout the app's lifetime, allowing values to be accessed from any screen. This satisfies the requirement to store selected values across multiple screens.
Data Sources (Option C) refer to external databases or services (like SharePoint or SQL). The question specifies holding data during a session and managing application state, implying local storage rather than persistent external connectivity, which makes Data Sources incorrect for this specific scope. Global Variables (Option D) is not a standard Power Apps component term; variables are either Local or Global Context Variables, or Collections. There is no distinct entity called a "Global Variable" separate from the context variable concept.
Therefore, the two components that correctly address both the tabular data requirement (Collections) and the cross-screen value storage (Context Variables) are A and B.
Official Reference
- https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-collect
- https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/global-context-variable
- https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-data
These links open the official vendor documentation in a new tab.
Exam Strategy
When asked about 'state' or 'temporary storage' in Power Apps, immediately think of local structures like Collections and Context Variables. Differentiate between Local Context (screen-specific) and Global Context (app-wide). Remember that 'Global Variable' is a distractor; use 'Context Variable' instead. For tabular data requirements, Collections are the definitive choice.
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
exam_upskill 👍 1A. Collections D. Global variables
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.