Avatar

Level 3

Thank you for your reply.

I have modified the script as you have suggested:

var vEnd = Time2Num(ActionsEndTime.formattedValue, "HH:MM") // this is the finish time

var vSec = 2 * 60 * 1000  // time in milliseconds - which is 2 minutes

var vFinish = vEnd - vSec // take away the finish time from 2 minutes to give a new time to trigger to alert

var vcurrent =  Time2Num(DateTimeField1.formattedValue, "HH:MM") // this is the current time field

form1.ActionsHeaderFrame.DateTimeField1.execCalculate() // recalculate a hidden current time field to give the current time

if (vcurrent == Num2Time(vFinish, "HH:MM")) then  // if the current time equals the finish time - 2 minutes then show message

xfa.host.messageBox("You only have 2 minutes to finish the agenda " ,"Reminder",3,0)

else

""

endif

I need help with recalculating the current time field as the execCalculate() will update once and remain static.

This is the function in the current time field for the current time  -  DateTimeField1.rawValue = num2time(Time(), TimeFmt(1))

Is there a way to have the time field show like a system clock time and refresh automatically?

I think this will be the only way I can get the formcalc script to work the way it should.

Any suggestions you may have will be most appreciated.