Storing week number in Survey123

669
4
Jump to solution
02-01-2018 03:43 AM
HayleyRobins
New Contributor II

Hi

I would like to name the surveys in my Inbox based on the week number.

Is it possible to extract the week number from the current date and use it as part of the instance_name?

Thank you,

Hayley

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Hayley,

Yes, I'm seeing the same issue in the creation of the form XML file.  You can work around it by using another date format (say, '%M'); after the form processing is completed, you can manually substitute '%W' for '%M' in the XML file and then publish.  I'll file an issue to have the form validator accept '%W'.

View solution in original post

4 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Hayley,

The Survey123 mobile application supports %W to provide the ISO week number.

0 Kudos
HayleyRobins
New Contributor II

Thanks James. Could you give me the syntax? I'm trying:

format-date(${my_date},'%W')

but getting an '"unrecognized escape in date format string" error.

Thank you

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Hayley,

Yes, I'm seeing the same issue in the creation of the form XML file.  You can work around it by using another date format (say, '%M'); after the form processing is completed, you can manually substitute '%W' for '%M' in the XML file and then publish.  I'll file an issue to have the form validator accept '%W'.

View solution in original post

HayleyRobins
New Contributor II

Brilliant thank you. The workaround works great!

0 Kudos