Hello Skyler Dewey,
You should be able to pass a date into a date field using the Web form URL parameters. The syntax would look something like:
https://survey123.arcgis.com/share/<Form item ID>?field:_date=10/14/2020
Or if the question is a date/time question it would look like:
https://survey123.arcgis.com/share/<Form Item ID>?field:datetime=10/14/2020%2012:23
This would return October 14th, 2020 12:23 PM.
Thank you,
Zach
Thanks for the quick reply. The date shows up in the url string but it is not populating the field in the form (example of the date showing up just as expected in the browser url &field:SymptomOnsetDate=9/9/2020)?
Does the field need to be formatted a specific way for it to also display there as well?
field:CASELastName={LastName}&field:SymptomOnsetDate={IllnessOnsetDate}
Quite a few fields are passed successfully above is just the first two of the long url. The field SymptomOnsetDate "type" in Survey123 is just date, it doesn't have any other special formatting associated with it?
type | name | label | hint | constraint | constraint_message | required | required_message | appearance | default | readonly | relevant | calculation | choice_filter | repeat_count | label::language1 | hint::language1 | media::audio | media::image | body::accuracyThreshold | bind::esri:fieldType | bind::esri:fieldLength | bind::esri:fieldAlias | body::esri:inputMask | body::esri:style | bind::esri:parameters | bind::saveIncomplete | bind::type | bind::esri:warning | bind::esri:warning_message | parameters |
date | SymptomOnsetDate | Enter Illness Onset Date | This date could be the date of first positive specimen OR Symptom onset date | yes | esriFieldTypeDate |
Thanks so much for any help figuring out where I'm going wrong here!
Hi! Did you ever find a work around for this? I am having the same issue!
I think I have also been experiencing this issue. A date passed from a parent feature to child feature in a survey embedded in a dashboard is not being recognised.
Date field in form which should be populated by the date from the url parameter remains greyed out.
To see if any value is coming through via the url the date passed by the url parameter was written to a text field and displays as a formatted date (e.g. Wednesday 1st May 2024, 11:30). When passed to date-time formula in XLS form to try and convert this it returns Invalid format.
Adding other date field instead e.g. CreationDate works albeit drops the time.
It seems like the url parameter is picking up the formatted version of the date string in the parent date field rather than a date value. I tried changing the field formatting using the fields manager in map viewer for the parent layer but no effect.
The workaround was to create a decimal date field for the parent feature which is populated on feature creation. This is then passed from parent to child via the url parameter and converted back to date using the date-time function and used to populate the date field in the child feature.