PL-900 · Question #252
You are creating a canvas app to enable users to order tickets. You create an input field for users to input the number of tickets to order. Users must order a maximum of four tickets and a minimum…
The correct answer is A. formula. To dynamically change the color of an input field in a canvas app based on its value meeting specific criteria, you should use a Power Apps formula.
Question
Options
- Aformula
- Bcalculated column
- Cgallery
- Dconnector
How the community answered
(27 responses)- A93% (25)
- C4% (1)
- D4% (1)
Why each option
To dynamically change the color of an input field in a canvas app based on its value meeting specific criteria, you should use a Power Apps formula.
A Power Apps formula can be applied to properties like `Fill` or `Color` of an input control, using conditional logic (e.g., `If()` statements) to evaluate the input value and return the appropriate color based on the specified range.
A calculated column is a feature in data sources like SharePoint or Dataverse that derives its value from other columns; it is not used directly for client-side visual conditional formatting in a canvas app.
A gallery is a control used to display a list of items; it is not used to define the conditional coloring logic for a single input field.
A connector enables a canvas app to connect to data sources or services; it does not provide the logic for dynamic UI element coloring.
Concept tested: Canvas app conditional formatting with formulas
Source: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-colors
Topics
Community Discussion
No community discussion yet for this question.