Hi there,
I am trying to make a field relevant based on a time calculation. I'm having a wee bit of trouble getting it to do exactly as I'd like, so I'm hoping someone may be able to take a look and give a few pointers? Many thanks in advance!...
~~~
I have surveyors collecting data during a specific time period, i.e. between 1am and 3am.
The field, Time_Warning (see image), is note type and is configured to act as a warning to the surveyor with the message - 'Warning - you are collecting outside of the survey period. This submission will not count. We assume this is a test.'.
The warning should be visible before the start epoch time, hidden during the survey period, and reappear after the end epoch time. If an entry is submitted outside of the survey period, the attribute is calculated as 'test', if its within the survey period the attribute remains null/blank. This is what I use for data QA during and post survey.
I can get the start epoch time to work - the field is visible before the start epoch time and disappears after. But once the time is post the survey period's end time, the field does not reappear as I expected it to.
My question is
- Is this functionality possible in Survey123? If it is, would someone mind taking a look at my calculations?
These are the calculations I'm using (in image)
M2:
now() + pulldata("@property", "utcoffset")*1000*60*60
L3:
((1582548600000) - (now() + (pulldata("@property", "utcoffset")*3600000)))>0 or ((1582464000000)-(now() + pulldata("@property", "utcoffset")))>0
M3:
if(((1582548600000) - (now() + (pulldata("@property", "utcoffset")*3600000)))>0 or ((1582464000000)-(now() + pulldata("@property", "utcoffset")))>0,'test','')
Start epoch time: 1582548600000
End epoch time: 1582464000000
(in milliseconds)
If it's not possible, then how this is currently working for me is good enough. Though it would be great if was in future Survey123 releases 
Many thanks!