In my scenario, I have a task that the user needs to perform in every shift. Let’s imagine, I have a morning, day and night shift. I know how to calculate the next day, week, etc. using an expression in the trigger but how can I calculate the date/time for the start of the next shift?
In Tulip, we can maintain the “Shifts & Schedules” in settings. In their, I can set-up a shift plan with time information. But I did not find anyway to use this information in a trigger.
Before query/aggregations we also setup a connector function that would query the same table.
The benefit to this method is that I could return an array of both the current and previous two shifts (or as many as I wanted by adjusting the record limit) along with the start time of the shifts in one shot.
The down side is that we’re basically doing an external call back to the Tulip platform which really shouldn’t be necessary. And of course if for some reason the REST call stalled, it would hold up the App for the 60 second timeout before it would respond again.
In Tulip, you can use the Shifts and Schedules feature to set up your shifts and their start times. Once you have created your shift plan, you can use the Tulip API to retrieve the information about the start times of the shifts.