Exam PL-200 All QuestionsBrowse all questions from this exam
Question 106

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.

    Correct Answer: A, D

    To create a variable that is available only to the current screen in a canvas app, you should use the following functions: UpdateContext and Set. UpdateContext allows you to create and update context variables within the current screen, which is the main method to manage screen-specific data. Set, on the other hand, is primarily used to create global variables but can also be used within a specific screen to create variables scoped to that screen. These two functions together provide the capability to handle variables that are limited to the current screen.

Discussion
anakinskwlkrOptions: AD

WHY NAVIGATE for God's sakes??? nonsense

MrEz

I agree. Navigate to where. There is only 1 screen. it does not say there is any other screen there. it says current screen. but does this mean, that there are (implicitly) other screens there to navigate to? One screen is current screen.

Mayah974Options: AB

Updatecontext Navigate

b304b2cOptions: AE

A and E.

b304b2c

In a canvas app, if you need to store data in a variable that is available only to the current screen, you should use the following two functions: A. UpdateContext - This function creates or updates a context variable within the current screen only. It does not affect other screens or the global context. E. Collect - While Collect can be used to create collections that are accessible across the entire app, it can also be used in conjunction with UpdateContext to manage data specific to a screen if handled correctly.

b304b2c

The Set function would not be suitable for this scenario because it creates a global variable that is available throughout the entire app, not just the current screen. The SaveData function is used for saving collections to local storage and is not related to screen-specific variables. The Navigate function is used to change screens, not to create variables. Therefore, the correct answers are A (UpdateContext) and E (Collect), used with the right context.

JAY88Options: AB

- UpdateContext - Navigate https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-variables#types-of-variables You implicitly establish and set context variables by using the UpdateContext or Navigate function. When the app starts, the initial value of all context variables is blank.

Jacky678Options: AB

The answer is correct. Context variables are implicitly created by using the UpdateContext or Navigate function. https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-updatecontext

w0mzOptions: AD

A - UpdateContext D - Set

ck1985

D is incorrect, Set is used for Global variables.

BikramjitSinghOptions: AB

26th june exam

Brooklyn_Options: AD

"Set" can be used to create both local and global variables in Power Apps, depending on how you use it. If you use Set within a specific screen, it creates a local variable that is only accessible within that screen. In this case, it meets the requirement of storing data in a variable that is available only to the current screen. If you use Set at the app level, it creates a global variable that is accessible throughout the entire app. So, it can be used to create both local and global variables based on where you place it. If you want to create a variable that is only available to the current screen, you should use Set within that screen's context.

Brooklyn_

Nevermind, I'm stupid, A and B are the right answers. here's the documentation to prouve it https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-variables

Brooklyn_

I got fooled by ChatGPT 😒

365GingerOptions: AB

Answer is UpdateContext and Navigate. Source: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-variables#types-of-variables

ttienOptions: AD

on exam 20/9/2023

Sweden2022Options: AD

To create a variable that is available only to the current screen in a canvas app, you should use the following functions: A. UpdateContext: This function allows you to create and update context variables within the current screen. Context variables are only accessible within the screen where they are defined. D. Set: The Set function is used to create and set local variables within a screen. Local variables are available only within the screen where they are defined. So, the correct options are A (UpdateContext) and D (Set). These functions will enable you to create a variable that is scoped to the current screen in your canvas app.

drjphat

Set sets global variables. D is not correct.

Kindum

The Answer is A

CP14Options: AD

Correct