Clear Dirty
The Clear Dirty construct is used to reset the form's dirty state, marking it as pristine again. When a user interacts with a form, it becomes dirty (modified) due to the changes made. By clearing the dirty state, you effectively restore the form to its original, unmodified state. This can be applied to the entire form or specific validation groups, ensuring that any validation flags or unsaved changes are cleared.
There are two ways to reset the form:
- Reset the Whole Form.
- Reset Individual Groups.
In the designer canvas of an Interface, Master Layout or Component event flow, drag and drop the Clear Dirty construct into the flow.
Double-click the construct to configure the properties as required and then click Save.
| Property | Description | Comments |
|---|---|---|
| Label | Labels help developers quickly understand each step in the logic flow without examining the details of the construct. | It is recommended to provide a simple, precise label that can improve readability. |
| Form Selection | Select ‘Whole Form’ or ‘Individual Groups’ from the list. Whole Form Individual Groups | If the Whole Form is selected, the Clear Dirty action will reset the entire form, discarding all unsaved changes across all fields. If Individual Groups are selected, a multi-select dropdown (Groups) will appear. |
| Groups | Allows users to choose and clear dirty states for specific form group(s). | When individual groups are selected, only the form groups corresponding to the selected validation groups will undergo the Clear Dirty action, leaving the rest of the form’s dirty states unaffected. |
| Comment | Specify whether to comment this construct or not. Either Yes or No. | By default, it is set to No.If marked as Yes, the construct is treated as a commented expression and ignored in code generation. |
| Description | Provides details about the Clear Dirty purpose and behavior. | Helps in understanding the Clear Dirty construct. |
Note: An asterisk (*) denotes that the property is mandatory for adding the Clear Dirty Construct.
The success message displays upon successfully adding the construct.