FORMULA NOT WORKING IN USER INTERFACE

IFS(AND([JOBLINE].[RATE_OF_PAY]="HOUR", ISBLANK([END TIME])),   "",

AND(
[JOBLINE].[RATE_OF_PAY]="HOUR", ISNOTBLANK([END TIME])),

if([END TIME]>[START TIME], TOTALHOURS([END TIME] - [START TIME]), TOTALHOURS([END TIME] - [START TIME])+24),
AND(
ISNOTBLANK(ticket_text), CONTAINS([JOBLINE].[PICKUP_LOCATION], "MYRTLE GROVE PIT")),
MID([ticket_text],( FIND("ons:", [ticket_text])+5), 6),
TRUE, "")

Okay, I have tried everything I can think of, it just wont work, it was working just fine, 2 out of the 3 statements do work...but it keeps calculating the one that runs into the next day as a negative amount...Please help

 

 

 

0 1 54
1 REPLY 1

IFS(
  [JOBLINE].[RATE_OF_PAY] = "HOUR",
    IF( ISBLANK([END TIME]), "", 
        TEXT( TOTALHOURS([END TIME] - [START TIME]) +
              IF([END TIME] > [START TIME], 0, 12)
        )
    ),
  AND(

    ISNOTBLANK([ticket_text]),
    CONTAINS([JOBLINE].[PICKUP_LOCATION], "MYRTLE GROVE PIT")
  ),

    MID([ticket_text], FIND("ons:", [ticket_text]) + 5, 6),
  TRUE, ""
)

Top Labels in this Space