How to hide dateTime on form but still save in feature layer?

431
4
Jump to solution
02-04-2020 01:11 PM
LisaSmith1
New Contributor II

If I use type=dateTime and default=now() in my survey I get date/time showing up in feature layer like this:

I want to hide it on the survey but still save in feature layer to work with in Operations Dashboard.

If I change type = hidden and keep default=now(), the Date/Time shows:

I've tried putting fields in the these fields on the form but can't get anything to work. Help?

bind::esri:fieldTypebind::esri:fieldLength

:

0 Kudos
1 Solution

Accepted Solutions
Kanin
by Esri Contributor
Esri Contributor

Has your survey been published before? If so, please try creating a new field of another name and set the bind::type column accordingly. This is because if a survey has been published, the field type may be locked by the schema of the underlying feature service.

If this answer is helpful, please mark it as helpful. If this answer solved your question, please mark it as the answer to help others who have the same question.

View solution in original post

4 Replies
Kanin
by Esri Contributor
Esri Contributor

Hello Lisa Smith‌,

As per Survey123 documentation:

Note that bind::esri:fieldType only controls the field type created in the feature service. To control the field type for a question during a survey, use the bind::type column.

Please try to set the bind::type column to "dateTime" in addition to the bind::esri:fieldType column. You could find a sample configuration in the attached file.

Best regards,

Kanin

If this answer is helpful, please mark it as helpful. If this answer solved your question, please mark it as the answer to help others who have the same question.

0 Kudos
LisaSmith1
New Contributor II

I tried that but it doesn't work. This is the error I get when trying to set bind::type=dateTime "This value doesn't match the data validation restrictions defined for this cell"

0 Kudos
Kanin
by Esri Contributor
Esri Contributor

Has your survey been published before? If so, please try creating a new field of another name and set the bind::type column accordingly. This is because if a survey has been published, the field type may be locked by the schema of the underlying feature service.

If this answer is helpful, please mark it as helpful. If this answer solved your question, please mark it as the answer to help others who have the same question.

LisaSmith1
New Contributor II

Thank you. That worked.