Link to home
Start Free TrialLog in
Avatar of Lee Ingalls
Lee IngallsFlag for United States of America

asked on

Test condition and convert number to negative

I would like to check a field IF AttendDet.ActClockIn = 12:00 or 22:30 and AttendDet.TotActTime = 0.50 THEN convert the 0.50 to a negative number, ELSE null or nothing.
Avatar of Lee Ingalls
Lee Ingalls
Flag of United States of America image

ASKER

I figured out how to get the number to negative by multiplying it by (-1)... now for the rest of it.
SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK, sorry for the delay.
The ActClockIn field type is string.
I realized that by changing the sign of the {AttendDet.TotActTime} amount of 0.50 to negative it was doubling the effect I was looking. So I simply changed it to, THEN 0

IF {AttendDet.ActClockOutTime}='12:30' OR {AttendDet.ActClockOutTime}='23:00' AND
{AttendDet.TotActTime}=0.50 THEN 0
ELSE {AttendDet.TotActTime}

'12:30' and '23:00' are the times that the automatic break calculations end. I erroneously had the second break end time set at '22:30' changed to '23:00'...
I needed to filter out the automatic break time.

Thank you James0628 and mlmcc for your always valuable assistance!

BudELee
You both answered the original question; then I changed it once I realized I had misstated my requirement. As always I value your input.

Cheers, Lee