DateTime not working in Web Form With Contraints

1538
10
10-24-2019 08:10 AM
Chris_Anderson
Occasional Contributor II

We are getting ready to roll out a Web version of our Deer Harvest Reporting Form. It works really well except for the entry of the dateTime. We have a constraint of .<= now() to prevent hunters from entering data in the future. Our testers are letting us know they are getting an error when they enter the date and time. Our workaround is to set a "wrong" date and time, then setting correctly. Has any one else run into this problem?

Attached is a screen shot of the error.

Any help you can provide is greatly appreciated,

Chris Anderson

Florida Fish and Wildlife Conservation Commission

0 Kudos
10 Replies
Shwu-jingJeng
Esri Regular Contributor

Hi Chris,

What version of survey123 Connect you used to publish the survey?

Are you using the web form and open it on the mobile device?

Does the error occur if you submit from field app?

0 Kudos
Chris_Anderson
Occasional Contributor II

Sorry I haven’t responded sooner.

1. I am using Connect 3.5.157

2. Yes. It occurs when trying to use the Web form on the phone. We are trying to make this reporting form available through multiple means to make it easier for hunters to use.

3. No. It does not occur with the field app.

Here is part of an email from staff that have tested:

One of our call center operators mentioned that some hunters had told that they had issues with the online reporting. She did not get details on the exact issues, but I played around with it on my phone and my computer and did run into one issue. When reporting on the website through my phone’s web browser (safari), I get an error the harvest date/time are incorrect even when they are within the correct parameters. This doesn’t seem to be an issue when I reported through my computer’s web browser (chrome). If I monkey around with the date and time (i.e. select another and then go back to the original) it will then accept the original date/time and allow me to get a confirmation number.

0 Kudos
MariaNieves
New Contributor III

I am getting the same error with Collector for iOS. I don't use the web interface for Survey123. 

0 Kudos
MariaNieves
New Contributor III

I meant Survey123 for iOS

0 Kudos
Shwu-jingJeng
Esri Regular Contributor

Hi Maria,

What version of field app are you using?

Could you repro the same with the latest 3.6 version of field app on iOS?

0 Kudos
MariaNieves
New Contributor III

I am able to reproduce it with the latest version 3.6.157. I opened a ticket with ESRI yesterday but I have an idea of why it is happening. Our field is actually a date field not a datetime field. Survey123 adds a default time even if the question is only asking for the date. Before the update, the default time for date fields was 12AM but now the default time is 12PM so any surveys created before noon, don't meet the .<= now() constraint requirement. You will only be able to reproduce this issue if you test in the morning thought. Any survey created after noon, will be after 12PM so it wouldn't be in the future.  

0 Kudos
Shwu-jingJeng
Esri Regular Contributor

Hi Maria,

In 3.5 hotfix1(v.3.5.176), we made a change to store local noon time(UTC12:00PM) instead of precious midnight(UTC12:00AM) for today() and date question. That's the reason you are seeing 12 hours off with current build of field app. As the timestamp in date question is to capture the correct date, I would suggest you to use a datetime question to manage your data and set the constraint. 

0 Kudos
MariaNieves
New Contributor III

Thanks for your response. I am keeping my field as date field but since I only care about the date, I am changing my constraint to .<=Today() instead of .<=Now()

0 Kudos
Shwu-jingJeng
Esri Regular Contributor

Hi Chris,

Could you try to change the web version setting to use the latest version from survey123 website>Survey>Settings tab>Version>change to "Always use the latest version (3.6)" and save the setting?

We had fixed some date/time issue with 3.6 version and this might make difference of the webform issue you are seeing.

0 Kudos