ASSOCIATE-REACTIVE-DEVELOPER practice question 28 of 35
Consider a Screen that contains a Form to collect Customer dat a. The Form has a Save Button with the On Click Destination set to a SaveOnClick Action, which sends the data to the server to store it in the database. What is the best way to make sure that we do not send the data to the server when the mandatory Customer data fields have not been filled in?
Full set: 262 questionsThe most effective and standard method in Outsystems Reactive Web Apps is to leverage the built-in validation mechanism. Setting the Save Button's Built-in validations property to Yes triggers the platform to automatically check all inputs within the Form for validity (e.g., mandatory fields). The result of this check is stored in the Form's Valid runtime property. The client action associated with the button must then use an If condition to check if Form.Valid is True before proceeding to call the server action. This two-step process ensures that invalid data is caught on the client-side, preventing unnecessary server requests and providing immediate feedback to the user.
A. This is incomplete. Setting Built-in validations to Yes only triggers the validation; it does not, by itself, stop the execution flow from calling the server action.
B. This is incorrect and inefficient. Outsystems provides automatic validation for mandatory fields. Manually setting an input's Valid property is for custom logic, not for standard mandatory checks.
D. This is a misuse of the feature. Built-in validation failures do not raise exceptions; they update the Valid property. Exception Handlers are for managing unexpected application errors, not for form validation logic.
1. Outsystems Official Documentation - "Validate form fields in Reactive Web Apps": This guide explicitly details the correct pattern. It states, "Set the Built-in validations property of the Button to Yes." and then instructs to, "Add an If element to the logic flow to check if the form is valid. Use the Form.Valid runtime property in the Condition."
Source: Outsystems Documentation, "Validate form fields in Reactive Web Apps", section "Client-side validation".
2. Outsystems Official Documentation - "Form Widget": This document describes the Valid runtime property of the Form widget. It clarifies that Valid is a "Boolean that indicates if the data of the Form inputs is valid or not." This property is what must be checked in the logic.
Source: Outsystems Documentation, "Widgets in Reactive Web and Mobile Apps", section "Form Widget > Runtime Properties".
3. Outsystems Official Documentation - "Button Widget": The documentation for the Button widget explains the Built-in validations property: "If Yes, the Form inputs are validated when the User clicks the Button." This confirms the first step of the correct process.
Source: Outsystems Documentation, "Widgets in Reactive Web and Mobile Apps", section "Button Widget > Properties".
Keep practicing
Take the free ASSOCIATE-REACTIVE-DEVELOPER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ASSOCIATE-REACTIVE-DEVELOPER practice questions
- Question 1When the event is mandatory, a Block event such as the Client Action must be specified to…
- Question 2Considering the Function property in Client Actions, which of the following options is co…
- Question 3Which event is needed if we do some logic over the result such as checking if it is empty?
- Question 4The SQL Query only allows executing SELECT statements
- Question 5The order of the Entities in the join does not matter.
- Question 6The list of values displayed on the Combo Box widget can be a combination of Entity and S…
