"Building a compensatory leave management system with multi-level approval in AppSheet."

Hello everyone,

I am currently building an AppSheet application to manage compensatory leave (time off in lieu) for employees, and I would appreciate your guidance.

:small_blue_diamond: Context:

We have two different work schedules:

1. Standard Schedule:

  • Sunday to Thursday

  • From 08:00 AM to 04:30 PM

2. Shift Schedule:

  • 2 days: 07:00 AM to 07:00 PM (day shift)

  • 2 days: 07:00 PM to 07:00 AM (night shift)

  • Followed by 4 days off


:small_blue_diamond: Compensatory Leave Rules:

For Standard Schedule employees:
They are entitled to compensatory leave if they work on:

  • Friday or Saturday

  • Public holidays (e.g., January 1st, May 1st, July 5th, November 1st)

  • Religious holidays (e.g., first 3 days of Eid al-Fitr)

For Shift Schedule employees:
They are entitled to compensatory leave under the same conditions EXCEPT:

  • Fridays and Saturdays

  • Islamic New Year (1st Muharram)


:small_blue_diamond: Approval Workflow:

The compensatory leave request must go through 3 levels of approval:

  1. Direct Manager (N+1)

  2. Department Manager

  3. HR Department (DRH)

Only after all approvals are completed, the leave should be automatically added to the employee’s balance.


:small_blue_diamond: My Questions:

  1. What is the best way to structure the database (tables/columns) in AppSheet for this scenario?

  2. How can I implement these conditional rules for eligibility (based on work schedule and dates)?

  3. What is the best approach to create a multi-level approval workflow?

  4. How can I automatically update the employee leave balance after final approval?

Any best practices, sample apps, or expression examples would be highly appreciated.

Thank you in advance!

1 Like

Hello @FAID_Seid,

Welcome back!

There are many ways to achieve what you are trying to achieve but I think automations will do.

Assuming the employee will request for the comp off:

  1. Create an entry on a request table with a “Approval Status” field of 0
  2. Launch an automated task to request for first level approval
  3. If approved, change the “Approval Status” field to 1
  4. Launch an automated task to request for second level approval, etc.
  5. Once the request is fully approved, you would increase the leave of absence balance

Again, this is just a suggestion. I’m sure you and other more experienced developers will have a better solution.

1 Like