Client Survey
| Id | Name (Link) | Surname | Gender | Marital Status | Have Kids | Mobile | Age | Last Updated On | Remove |
|---|
Requirement: Form and DB Operation 9 - Data Action (Data Source Abstraction)
This exercise simulates migrating the list data fetching logic from a direct Aggregate call to a Data Action call. The table pagination has been removed for a focused list view. The goal is to refactor the data access pattern for better architecture and reusability.
Architectural Change:
- Replace the direct filtering logic within the screen's rendering function with a call to a dedicated function (simulating a Data Action).
- This simulated Data Action function (
getDataAction) must accept the necessary input parameters: Search Text and Show Deleted Toggle State. - The Data Action must return the filtered list of records, maintaining the core logic:
- Filter 1: Apply the mutually exclusive filter (Active Records OR Deleted Records) based on the Show Deleted Toggle.
- Filter 2: Apply the Search Text filter on the resulting set.
- All existing functionalities (Soft Delete, Restore, Edit, Search) must continue to work flawlessly, demonstrating that the UI layer remains decoupled from the data retrieval specifics.
Hint (OutSystems): A Data Action is typically a function or block that encapsulates complex business logic or advanced filtering before providing the final data list to the screen widget (like the List/Table). This promotes clean separation of concerns.
Practice with Ankit | Form and DB Operations