June 8, 20178 yr Hi. I have a script that runs to add attendance to a fire department incident report. Before the script runs it checks the current time against the dismissed time of the call. If the current time is more than two hours after the dismissed time the script will not allow you to enter the attendance. My question is how would I add a second means of validation to not allow an attendance record to be added unless 15 minutes have elapsed from the start of the call while keeping the two hour time out component? Thanks Chris
June 8, 20178 yr Not sure where exactly you are having problems with this. If you want to have two cumulative conditions, join them by the and logical operator, e.g. : If [ Event Report::Start + 900 < Get ( CurrentTimestamp ) and Get ( CurrentTimestamp ) < Event Report::Dismissed Time + 7200 ] Perform Script [ "Add Attendance" ] Else Beep End If Note that only one test is necessary; in your version, you're testing twice for (almost) the same thing. -- P.S. Please post your script as code next time, so I don't have to retype.
June 9, 20178 yr Author Thanks everyone. I'm going to try this. I didn't know that. Thanks again!. Chris
Create an account or sign in to comment