Client Survey
| Id | Name (Link) | Surname | Mobile | CreatedBy | Last Updated On |
|---|
1
2
3
...
Requirement: Form and DB Operation 2 - Edit Survey
This exercise builds upon the previous one, focusing on implementing the Update (Edit) functionality. The key challenge is creating a single reusable form for both Add and Edit operations and handling data retrieval and update logic.
List Screen Updates:
- The Name field in the table must be converted into a clickable link.
- Add two new columns to the table: CreatedBy and Last Updated On.
Edit Functionality:
- Clicking the Name link must navigate the user to the same form used for adding records.
- The form must load in Edit Mode, pre-filling all input fields with the data from the selected client.
- The form title should dynamically change to reflect the Edit Mode (e.g., "Edit Client Survey (ID: X)").
- The form must display the **CreatedBy** and **Last Updated On** (or RecordUpdatedOn) information for the user to view (read-only).
- Clicking Save in Edit Mode must execute the Update logic, modifying the existing record in the database, updating the RecordUpdatedOn/By fields, and **redirecting the user back to the main list screen**.
Hint (OutSystems): The Form's Source Record parameter should be determined by a local variable, which is populated either as a New Record (for Add) or by a **Get** action (for Edit) based on the input ID parameter of the screen.
Practice with Ankit | Form and DB Operation 2