Logo Practice with Ankit | Form and DB Operations

Client Survey

Id Name (Link) Surname Gender Marital Status Have Kids Mobile Age Last Updated On
Requirement: Form and DB Operation 6 - Add new fields (Gender, DOB, Age Calculation)

This final exercise focuses on integrating new data fields with specific data types (Date, Static Text List) and introducing a client-side calculated field for display.

Database Entity Setup:

  • Add two new attributes: Gender (Text) and DOB (Date).

Form Implementation:

  1. The Gender field must be a Dropdown with options: Male, Female, and Undefined. The Undefined value must be the database default/selected value.
  2. The DOB field must be a Date Type input and is a Mandatory field.
  3. Ensure both fields are included and function correctly in both the Add and Edit forms.

List Screen Update & Calculation:

  1. Add a new column, Gender, to the main list screen.
  2. Add a new column, Age, which displays a calculated value.
  3. The age must be calculated based on the client's DOB relative to the current date and displayed in the format: <n> Year, <n> Month.
    • *Example 1:* If the age is 1 year and 1 month, show: 1 Year, 1 Month.
    • *Example 2:* If the age is exactly 5 years, show: 5 Year. (Do not show '0 Month')
    • *Example 3:* If the age is 11 months, show: 11 Month. (Do not show '0 Year')

Hint (OutSystems): Age calculation logic is typically done in an Action or a Client Action and is often implemented as a custom Function for reusability across screens and expressions.

Ankit G Avatar
About the Author: Ankit Gangrade

Ankit Gangrade is a passionate Low-Code Architect, Developer, & Educator dedicated to helping students and professionals build modern applications faster using OutSystems and Cloud-Native technologies. His goal is to bridge the gap between traditional coding and modern low-code platforms — empowering the next generation of developers to build smart, scalable, and cloud-ready apps.