Skip to main content
Question

If blank = Time of Day Field + 1 Hour

  • February 6, 2024
  • 0 replies
  • 161 views

I followed another thread and was successfully able to create time blocks in a calendar report. However, because I created a new field for moving forward, I have thousands of records without any data in that field. 

I am trying to create a formula that states if the field is empty then add an hour from another time of day field.

I had [Appointment Start Time] already and have created [Appointment Estimated End Time] (Both Formula - Time of Day fields)

In the calendar, the calendar is based on a Timestamp field of [Work Order Date] + [Appointment Start Time] (Formula - Date/Time field)

For the Calendar's "End Date" I will also use a Timestamp field of [Work Order Date] + [Appointment Estimated End Time] (Formula - Date/Time field)

It will work - but brings me to the issue that I want to enter data into the empty fields of [Appointment Estimated End Time] so that all previous records still show within the calendar.

I know this is wrong but I want it to read something like:

IF (is null ([Appointment Estimated End Time]), ([Appointment Start Time] + Hours (1))

In the field I want it to be an hour after the start time. It needs to read "if blank" rather than having it go to a default 1 hour. It won't always be 1 hour moving forward and another time of day will be manually entered.



------------------------------
Jillian P
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9
  • Registered
  • February 6, 2024

The formula you have is a good start - something like: 

IF ( isnull([Appointment Estimated End Time]), [Appointment Start Time] + Hours (1), [Appointment Estimated End Time])

where it will add 1 hour to start if there is no end time, else use the end time.



------------------------------
Chayce Duncan
------------------------------