- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jan 20, 2024 09:06 PM - edited ‎Jan 20, 2024 09:08 PM
I have a tab within a table, the tab is called PTO. the PTO tab has two different views I am working between for this automation. The PTO tab as a whole is populated from forms that are submitted containing requests for time off from employees. This form contains fields for [start date] and [end date] and is intended to capture both single and mult-day requests off. The first automation sends an actionable slack message for approval, which is working correctly. The second automation I am trying to set-up is intended to send a message to a slack channel each day that there is an employee out of office, listing which employee is out of office. (Bonus points for this only running Monday-Friday, even if the dates fall on the weekend).
My first attempt at the automation was setting up the second view of the same tab, which would be filtered to only show records based on conditions, but I wasn't able to find a way for the records to populate if the request required more dynamic info, such as it falling across more than 2 days (start date and end date).
The second attempt was to create two formula fields within the first view, one being:
AND(TODAY() >= {Start Date}, TODAY() <= {End Date})
and the second being:
IF(IsTodayWithinRange, "Out of Office", "In Office")

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jan 24, 2024 08:31 PM
Bonus points first:
IF( AND(WEEKDAY({Date}) >= 1, WEEKDAY({Date}) <= 5), 'Weekday', 'Weekend' )
now from chatgpt:
IF(
AND(
IS_AFTER(TODAY(), {Start Date}),
IS_BEFORE(TODAY(), {End Date})
),
"Not in office",
IF(
OR(WEEKDAY(TODAY()) = 0, WEEKDAY(TODAY()) = 6),
"It's the weekend",
"In Office"
)
)
