Microsoft

PL-200 practice question 92

Microsoft Power Platform Functional Consultant · free question 92 of 309

Question

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. Correct
  • 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.

Explanation

Track the selections in a collection: the checkbox OnCheck adds the gallery item to the collection, OnUncheck removes it, and the checkbox Default checks whether the item is in the collection. The button then clears the collection with Clear, and every checkbox returns to unchecked because its Default no longer finds the item. The collection also gives the purchase screen the list of selected products. Reset cannot clear the checkboxes from the button: Microsoft documents that controls inside a Gallery cannot be reset from outside the gallery, so neither Reset on the checkbox nor Reset on the gallery clears the selections. Reload is not a Power Fx function, and Revert refreshes a data source and discards errors; it does not reset control values.

Need the theory? Learn it free in the PL-200 course on Godlike Academy

Practice the whole free set

PL-200 is a free exam: all 319 questions with instant feedback, plus Learn and Exam modes and PDF export, free.