Hi everyone,
I'm running into a problem on a survey when I'm trying to extract date values from another feature service.
The survey required to set up a javascript function to collect data from another feature service and recover the information of some students. Then, in the survey we recover the personal info of these students, among which we have birth dates.
These fields have to be notes and every pull works fine but for the dates. When I extract a date to note it transforms it in epoch format. Usually not an issue, as I would use format-date() to make it readable.
However, whenever I try to use format-date, Connect will return a type mismatch error. Same when using decimal-date-time or date functions.
My first workaround was to keep the birth-date type question as "date" and "read-only". That works for the field and desktop apps but not for the web browser app. Unfortunately, I need this to work on browser as well.
I double-checked that the field type of the pulled date is "date" and I confirm it's "date" and not "string".
I'm attaching a snippet of the survey and the function (minus the url of the pulled service)
I'm out of ideas and wondering if this is a bug or a known issue. I tag the great survey masters @JamesTedrick and @IsmaelChivite for support, but anyone help would be extremely appreciated.
Luca