Quote marks

11-05-2019 10:11 AM
Occasional Contributor II

I knew I shouldn't have included the quote mark in my answers, but I did. And now I'm regretting it. Here's my conundrum:

In a Survey123 survey, I can about hose connection size. The options for the question are:

1 1/2" (for one and a half inches)

2 1/2"

4 1/2"

The choice of answers recorded are:




They all have that trailing quote. To be honest, if I had noticed it before publishing, I would have deleted the quote mark, but I didn't.

Anyway, now when I try to export a feature report, the answer for that question doesn't export.

At the moment, the way I have it in my Word document is like this:

Hose connection size?

${hose_connection_size | selected:"1_1_2"} 1 1/2"

${hose_connection_size | selected:"2_1_2"} 2 1/2"

${hose_connection_size | selected:"4_1_2"} 4 1/2"


This doesn't return anything (obviously, because of the extra quote). But when I add a quote mark at the end like this:

${hose_connection_size | selected: "1_1_2""} 1 1/2"

I get this when I upload the word template:

Error: Failed to parse ${hose_connection_size | selected:"1_1_2"”}.

So, that's not working. Does anyone know how to get around this?

Thanks in advance...

Tags (1)
0 Kudos
3 Replies
Esri Esteemed Contributor

Hi Petronila,

You should be able to 'escape' the quotation mark by using a \" in place of " :

${hose_connection_size | selected:"1_1_2\""} 1 1/2"

Occasional Contributor II

As a work around, I already changed the template so that the report returned just the answer. That worked, but I couldn't have the little check box format.

Next time we change the template, I'll try using the forward slash. Thanks for the tip!

0 Kudos
by Anonymous User
Not applicable

Hi I have lat/longs written in DMS but without the special characters ie.  "40 18 12.12345 N"

I want to have a survey123 question that's hidden that will add in the special characters so it looks like this, "40° 18' 12.12345" N"

I was planning on using the concat function combined with the substr function to pull certain parts then add in the characters.  I ran into a problem trying to add the single quote (').  I couldn't get it recognize the single quote.

This is what I had below.  

concat((subtra(${DMSLat},0,2})), '°',(subtra(${DMSLat},3,5)), ''',(subtra(${DMSLat},6,12)),'" N')


So ultimately my questions is: A. How to do I add a single quote to an answer and B. Is my script correct?




0 Kudos