When building data entry screens, there may be a requirement to highlight the fields that have been changed by the user (eg - 'dirty' fields).
The possible ways to do this include changing the border or background colour of the affected field. With the form control, we can accomplish this task fairly simply.
How to modify an edit form to highlight fields that have changed
To demonstrate how to carry out this task, let's take the example of an edit form that displays data from a 'user' table.
To highlight the 'first name' textbox in a different colour when a user changes its value, we first identify the name of the text input control (DataCardValue10 in this example).
Next, we unlock the first name card, and change the Fill property to the following:
If(Parent.Default = DataCardValue10.Text,
RGBA(255, 255, 255, 1),
RGBA(237, 242, 251, 1)
This formula compares the default value against the current value of the text input change. If it's the same, we retain the default white colour of RGBA(255, 255, 255, 1). Otherwise, we apply the pastel blue colour RGBA(255, 255, 255, 1).
We then repeat this process for the remaining controls that we want to highlight.
At runtime, the background colour of the control will now change when the user modifies the value.
This post provided a brief walkthrough on how to highlight the fields that have been changed by a user.