ASSOCIATE-REACTIVE-DEVELOPER practice question 20 of 35
The following Screen (https://drive.google.com/file/d/1gm2xpbBQmEKTAHtCdj4wT0jNLnpDzZX/view?usp=sharing) has two Dropdowns, one to select a Country…
Full set: 262 questionsThe standard pattern for implementing cascading dropdowns in Outsystems Reactive Web Apps involves three key steps. First, the dependent data fetch (GetCities) must be set to Fetch: Only On Demand to prevent it from running on screen load. Second, a filter must be applied to this aggregate based on the variable bound to the primary dropdown (Country). Third, the OnChange event handler of the primary dropdown must execute a Refresh Data action targeting the dependent aggregate. Option D is incorrect because triggering the GetCities aggregate in the On After Fetch event of GetCountries would execute it at screen load, before the user has selected a country, which defeats the purpose of a cascading relationship.
A. Set the Fetch property of the GetCities Aggregate to Only On Demand. This is a required step to ensure the aggregate only runs when explicitly refreshed, not when the screen initially loads.
B. Refresh the GetCities Aggregate in the OnChange Action of the Country Dropdown. This is the correct mechanism to trigger the data fetch for cities after the user selects a country.
C. Filter the GetCities Aggregate by the selected country. This is essential to ensure the aggregate retrieves only the cities corresponding to the user's selection.
1. OutSystems Documentation, "Create a cascading dropdown": This guide explicitly outlines the correct procedure. It states, "Set the Fetch property of the Aggregate that gets the data for the second Dropdown to Only on demand." It also instructs to, "In the OnChange event of the first Dropdown, refresh the Aggregate that gets the data for the second Dropdown." This validates that options A, B, and C are correct steps.
Reference: OutSystems. (n.d.). Create a cascading dropdown. OutSystems Documentation. Retrieved from https://success.outsystems.com/documentation/11/developinganapplication/designui/patterns/usingtraditionalwebpatterns/controls/createacascadingdropdown/ (Note: While the URL mentions Traditional Web, the pattern and properties like Fetch: Only On Demand and OnChange are identical and fundamental in Reactive Web).
2. OutSystems Documentation, "Fetch and display data from the database": This document details the Fetch property of Aggregates. It explains that At Start fetches data when the Screen loads, while Only on demand means the data is fetched only when explicitly requested via a Refresh Data action. This supports why option A is a necessary step.
Reference: OutSystems. (n.d.). Fetch and display data from the database. OutSystems Documentation. See section on "Data Fetching Logic".
3. OutSystems Documentation, "Screen and Block Lifecycle Events": This document explains the On After Fetch event for data fetches. It clarifies that this event runs "after the data Fetch Action is executed." For an aggregate set to Fetch: At Start like GetCountries, its On After Fetch runs during the screen's initial load, which is the incorrect time to fetch dependent data based on user input.
Reference: OutSystems. (n.d.). Screen and Block Lifecycle Events. OutSystems Documentation. See section on "Data Fetch Events".
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…
