Select to view content in your preferred language

Time Ranges in a day for field to hide/appear

308
1
05-17-2018 11:41 AM
MattMulder
Occasional Contributor

I'm trying to get a given field to appear or disappear based on a given time range within a day (i.e. have the field show up between the hours of 8:00am to 4:00pm).

I'd also like to have a prompted field based on a "lifespan". So if a (year) date is input into the field that reads 2012, and the surveyed item has a five year life span, it now being 2018, then a following field would prompt to acknowledge its expiration of the item within the survey.

Thanks

0 Kudos
1 Reply
by Anonymous User
Not applicable

Hi Matt,

Yes it is possible to do what you want using calculations. For the time range question check, you will need to use a few extra questions with null field types (and possibly hidden) and then use a calculation (if statement) to check if the current time is in between the set times. The same applies for the 5 year date check, this can be done by subtracting 5 years from the current date, and then checking if that date is greater than the date that was input by the user into the field, which would indicate it was been more than 5 years and has therefore expired.

When working with date and time formats you will need to take the following into consideration in the calculations: https://community.esri.com/groups/survey123/blog/2016/04/17/dates-and-time-in-survey123-for-arcgis 

Regards,

Phil.

0 Kudos