exam questions

Exam PL-100 All Questions

View all questions & answers for the PL-100 exam

Exam PL-100 topic 4 question 3 discussion

Actual exam question from Microsoft's PL-100
Question #: 3
Topic #: 4
[All PL-100 Questions]

You need to set the value for a global variable named RunningTotal to 5 and navigate to the previous screen named MainScreen.
Which formula should you use?

  • A. UpdateContext( { RunningTotal: 5 } ); Navigate( MainScreen, ScreenTransition.Cover, RunningTotal );
  • B. If( Value(TextBox1.Text) >= 0, (Set( RunningTotal, 5); Back();), Color.Green )
  • C. UpdateContext( { RunningTotal:5 } ); Back()
  • D. Set( RunningTotal, 5 ); Back();
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
You set the value of the global variable with the Set function. Set( MyVar, 1 ) sets the global variable MyVar to a value of 1.
Use the Back and Navigate function to change which screen is displayed.
Reference:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-variables https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-navigate

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
odigetti365
Highly Voted 4 years, 8 months ago
correct 100%
upvoted 26 times
...
MarkD
Highly Voted 4 years, 6 months ago
The correct answer is a Set-Back so it is D (for dry humour).
upvoted 9 times
...
58117ec
Most Recent 1 year, 6 months ago
Correct
upvoted 1 times
...
SHNH
2 years, 6 months ago
D is correct.
upvoted 1 times
...
AnitaR
2 years, 7 months ago
Selected Answer: D
Correct!
upvoted 1 times
...
petrovig89
3 years, 5 months ago
Selected Answer: D
Correct
upvoted 1 times
...
DanielaPowerApps
3 years, 9 months ago
Correct
upvoted 1 times
...
Imranimmu
3 years, 10 months ago
As in Question asks for Global go with Set function
upvoted 1 times
...
philglew
4 years ago
Agree.
upvoted 2 times
...
AleValli
4 years ago
D is correct. As other users said, C is used to set a context variabile but we are required so set a global one
upvoted 3 times
...
SmileOS
4 years, 2 months ago
Correct
upvoted 2 times
...
sintyahamise
4 years, 4 months ago
CORRECT
upvoted 4 times
...
hoesslin
4 years, 4 months ago
..but C also works ;)
upvoted 2 times
hoesslin
4 years, 4 months ago
sorry, correction - it only works when the var already was set before; D is the correct answer
upvoted 2 times
jevmar
4 years, 4 months ago
It would not work in this case. We need to set a global variable, not a local one. If you use UpdateContext() in this case, it would create/update a local variable with exactly the same name (on that specific screen). The global variable would keep it's original value and would not be updated.
upvoted 3 times
...
...
...
mrsmjparker
4 years, 7 months ago
So, the answer they give is correct then?
upvoted 4 times
LinusBN
4 years, 7 months ago
Yes, the ans is correct Set() & Then Back()
upvoted 8 times
...
...
offshoreguy
4 years, 8 months ago
Updatecontext is only for local variables
upvoted 7 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...