A new knowledge base article has been published on our support portal.
In this business scenario we want to measure the duration of the lunch break on Appointments. We have two custom option set fields, Lunch-break start time and Lunch-break finish time, that are made up of 15 minute time slots, for example: 12:00, 12:15, 12:30, 12:45, 13:00.
We want to put the difference of these two “times” into another custom field called Lunch-break duration.
We will do this using North52’s Split function in conjunction with its DateDiff function.
North52 BPA Solution
The North52 BPA solution works like this:
- A Formula is set up that triggers whenever one of the Appointment’s Lunch-break start time or Lunch-break finish time fields are changed
- This formula will split the hours from the minutes for each of the option sets
- It will then create a DateTime type for each of these values
- Both DateTimes will have the same year, month and day – only the hour and minutes will be different
- The formula will calculate the difference between these two DateTimes
- Finally, the Lunch-break duration field will be updated with the difference between both DateTimes