exam questions

Exam PL-200 All Questions

View all questions & answers for the PL-200 exam

Exam PL-200 topic 2 question 13 discussion

Actual exam question from Microsoft's PL-200
Question #: 13
Topic #: 2
[All PL-200 Questions]

You have a canvas app that allows users to view, select, and purchase products. The app uses a Gallery control to display products and checkboxes that allow users to select products.
When users select items from the product catalog, they move to a different screen to complete a purchase.
Users must be able to clear all product selections when they click the button.
You need to configure the button.
What should you do?

  • A. Use the Reload(Control) formula and pass the gallery control as parameter to the Reload formula.
  • B. Use the Reset(control) formula and pass the checkbox to the formula to clear user selections.
  • C. Set the OnCheck value to populate a collection and the OnUncheck value to remove the item from the collection. Clear the collection when the user selects the button.
  • D. Use the Revert(Products) formula and pass the checkbox to the formula to clear user selections.
  • E. Use the Reset(Control) formula and pass the gallery control as a parameter to the Reset formula.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
HelenJose
Highly Voted 4 years ago
Should be C
upvoted 30 times
Connor55
3 years, 8 months ago
Confirmed C. Resetting the gallery OR the checkbox control does not change anything. The reset() function doesn't actually work with checkbox controls anyways.
upvoted 6 times
...
Stinow
3 years, 7 months ago
I would agree, however on boththis question and the earlier (same) question, it is -not- clear if the checkboxes are inside the Gallery control (think of a comma before 'and' in the question).
upvoted 2 times
...
HassanSarhan
4 years ago
No, this Answer is correct(B), C is right just only if B not here. Please go to Topic 2 Q1 and compare the two questions.
upvoted 13 times
...
...
vishjust
Highly Voted 4 years ago
There are multiple checkbox control respect to gallery records. if "B" is correct then we need to give command from formulabar to all check boxes, isn't it? I think C still makes sense here
upvoted 12 times
Nyanne
2 years, 9 months ago
True, but I think when creating a gallery, you technically only need to add 1 checkbox. The control needs to be added only once, to the gallery "template". The controls in the template is replicated for each item / record in the gallery. I have not tested this, but I believe if you reset the 1 checkbox control, it will reset each iteration of the checkbox in the gallery.
upvoted 2 times
Nyanne
2 years, 9 months ago
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/control-gallery
upvoted 2 times
...
Nyanne
2 years, 9 months ago
I have now tested it in canvas app. Adding 1 checkbox control will add 1 checkbox for each record iteration. Howere, the reset function cannot be used on controls inside a gallery from outside the gallery. https://docs.microsoft.com/en-us/power-platform/power-fx/reference/function-reset Have also tested using reset function on the gallery. However it does not affect the checkboxes in the gallery. I believe C is the only viable answer.
upvoted 6 times
...
...
...
noor9saleem
Most Recent 5 months, 1 week ago
Selected Answer: C
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-reset Reset function doesn't reset controls in gallery and form controls , so correct answer is "C"
upvoted 1 times
...
HAZZTA
11 months, 2 weeks ago
"You need to configure the button." It must be B since you CAN reset a gallery. I's not asking you to solutionism the gallery selections. It's asking you to "You need to configure the button." SO it's B.
upvoted 1 times
...
Nollz
1 year ago
E. Use the Reset(Control) formula and pass the gallery control as a parameter to the Reset formula. Reset(GalleryControl).Replace GalleryControl with the actual name of your gallery control. When the button is clicked, this formula will reset the gallery, clearing all selections. If you have checkboxes within the gallery, ensure that their default property is set to false, so they are unchecked when the gallery is reset.
upvoted 3 times
...
Red_lotus85
1 year, 2 months ago
Attention! you can reset a gallery just enter Reset(Gallery) and add {} to the Default property
upvoted 2 times
...
RominaT
1 year, 3 months ago
Selected Answer: C
Same as question 7 Topic 2.
upvoted 1 times
...
charles879987
2 years, 1 month ago
Selected Answer: B
C is not the right answer. Clearing collection does not reset the checkbox to its default state even though it does reset the collection.
upvoted 1 times
...
opai677147
2 years, 2 months ago
Selected Answer: C
Answer is C Reason : You cannot reset controls that are within a Gallery or Edit form control from outside those controls. Ref: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-reset
upvoted 2 times
...
alexhol
2 years, 4 months ago
C is correct
upvoted 1 times
...
yesah
2 years, 6 months ago
Selected Answer: B
It can't be C. Clearing the collection would not uncheck the boxes. You would have an empty collection with checked boxes. This question is pretty bad, but I think B is the best you can do here.
upvoted 2 times
yesah
2 years, 6 months ago
Nvm I think C is the only thing that makes sense
upvoted 2 times
...
...
llc
2 years, 7 months ago
Selected Answer: C
C is correct
upvoted 1 times
...
ELCA_Training_Center
2 years, 7 months ago
Selected Answer: C
should be C
upvoted 1 times
...
csocsinho
2 years, 7 months ago
Selected Answer: B
The Reset function resets a control to its Default property value. Any user changes are discarded. You cannot reset controls that are within a Gallery or Edit form control from outside those controls. You can reset controls from formulas on controls within the same gallery or form. You can also reset all the controls within a form with the ResetForm function. https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-reset Seems B is the correct answer.
upvoted 1 times
...
Sujadocs
2 years, 9 months ago
This question was part of the exam in Aug 2022
upvoted 1 times
...
essdeecee
2 years, 9 months ago
Selected Answer: C
"You cannot reset controls that are within a Gallery or Edit form control from outside those controls." a button inside the gallery will reset the specific records checkbox. Reset(Gallery) has no effect. Revert is for data. Cant see how it can't be C https://docs.microsoft.com/en-us/power-platform/power-fx/reference/function-reset#:~:text=You%20cannot%20reset%20controls%20that%20are%20within%20a%20Gallery%20or%20Edit%20form%20control%20from%20outside%20those%20controls.%20You%20can%20reset%20controls%20from%20formulas%20on%20controls%20within%20the%20same%20gallery%20or%20form.%20You%20can%20also%20reset%20all%20the%20controls%20within%20a%20form%20with%20the%20ResetForm%20function.
upvoted 2 times
Nyanne
2 years, 9 months ago
I have tested using Reset on a gallery control. The function does reset the checkboxes inside the gallery. When calling Reset on the checkbox control directly, an error appears, as reset cannot be called for items inside a gallery, from outside a gallery.
upvoted 1 times
...
...
BrettusMaximus
2 years, 10 months ago
Answer is E: Reset (gallery) sets the entire control including ALL its checkbox's to their original state and reshow the original gallery content. https://docs.microsoft.com/en-us/power-platform/power-fx/reference/function-reset All actions must be in the button's formulae thus D would not work. D requires a second collection which is not visible and not part of the gallery. Setting onClick for the checkbox 's inside the button will do nothing until the checkbox's are clicked after the button is clicked. This is the same for the previous question Topic 2 Q1
upvoted 3 times
BrettusMaximus
2 years, 10 months ago
On reflection - I tried this and it did not work as planned. Documentation said you cannot use Reset inside a gallery. Answer C is therefor the best answer.
upvoted 6 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 ...