nerdexam
Microsoft

PL-200 · Question #215

You have a canvas app. The canvas app must store data in a variable that is available only to the current screen. You need to create the variable. Which two functions should you use? Each correct answ

The correct answer is A. Navigate B. UpdateContext. In Power Apps canvas apps, context variables are screen-scoped-they exist only within the screen where they are set and are not accessible from other screens. UpdateContext (B) directly creates or updates a context variable on the current screen: UpdateContext({varName: value}).

Create apps by using Microsoft Power Apps

Question

You have a canvas app. The canvas app must store data in a variable that is available only to the current screen. You need to create the variable. Which two functions should you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

Options

  • ANavigate
  • BUpdateContext
  • CSet
  • DCollect
  • ESaveData

How the community answered

(42 responses)
  • A
    81% (34)
  • C
    5% (2)
  • D
    5% (2)
  • E
    10% (4)

Explanation

In Power Apps canvas apps, context variables are screen-scoped-they exist only within the screen where they are set and are not accessible from other screens. UpdateContext (B) directly creates or updates a context variable on the current screen: UpdateContext({varName: value}). Navigate (A) also creates context variables on the destination screen via its third parameter: Navigate(Screen, Transition, {varName: value})-those variables are scoped to that target screen only. Set (C) creates global variables accessible across all screens. Collect (D) creates or appends to a collection (a global table). SaveData (E) persists a collection to local device storage. Only A and B produce screen-scoped variables.

Topics

#Canvas Apps#Variables#Context Variables#Power Apps Functions

Community Discussion

No community discussion yet for this question.

Full PL-200 Practice