nerdexam
Microsoft

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.

Submitted by minji_kr· Apr 18, 2026Demonstrate the capabilities of Power Apps

Question

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 of two tickets. If a user enters a number except 2, 3, or 4, the input field must display in red. If a user enters the numbers 2, 3, or 4, the input field must display in green. You need to color the input field based on the user input. What should you use?

Options

  • Aformula
  • Bcalculated column
  • Cgallery
  • Dconnector

How the community answered

(27 responses)
  • A
    93% (25)
  • C
    4% (1)
  • D
    4% (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.

AformulaCorrect

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.

Bcalculated column

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.

Cgallery

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.

Dconnector

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

#Power Apps Canvas Apps#Formulas#Conditional Formatting#Input Validation

Community Discussion

No community discussion yet for this question.

Full PL-900 Practice