Format read-only datetime fields in web survey?

446
3
08-26-2020 11:55 AM
TomSchwartzman
Esri Contributor

I have a survey which captures a datetime.  When entering data via the browser, or even editing/viewing an existing survey entry via the browser (mode=edit&globalId=xxx, or even mode=view), I see a nicely formatted split date/time display. In this survey the datetime field is not read-only:

If I have another survey pointed to this same underlying dataset and in this survey the datetime field is marked as read-only (i.e. using a dashboard to edit a survey entry, with some fields r/o), I see this:

Which is a very unfriendly way for a casual user to view the datetime field.

Is there any way I can force a better format when in read-only mode for this field?  

Thanks,

Tom S.

0 Kudos
3 Replies
Jim-Moore
Esri Regular Contributor

Hi Tom

This is a known issue with read-only dateTime fields in the web app. Please log a bug through Esri Support if you'd like to track any progress on this issue.

One workaround could be to show this information in the second survey in a note question. You could format the date and time using the format-date() function (see Formulas—ArcGIS Survey123 | Documentation for more info). For example:

format-date(${datetime},'%m/%d/%Y %H:%M')

You could then use the hide=field: URL parameter to hide the dateTime question. Hope this helps.

Cheers,

Jim

TomSchwartzman
Esri Contributor

Thanks Jim - the note will work just fine.

Tom

JodyZhengLiu
Esri Contributor

Hi Tom,

This is fixed in the web app and will be available on the next 3.11 release planned for mid Oct. Would you mind have a try then?

Thanks,

Jody Zheng Liu