Another concat formula issue-- why won't it run?

668
3
Jump to solution
06-12-2017 03:27 PM
deleted-user-57QLt_-7NcdX
New Contributor II

Hi,

I'm having problems getting a concat function to combine three variables so I can move onto a pulldata() function.

In Line29 of the attached Survey123 XLSForm, I can get the concat function to run with the first two variables (e.g., concat(${Shade} , '_', string(${maxRFMTemp2}))), however, when I add the third variable, which is critical for the subsequent pulldata() function, the process dies (e.g. concat(${Shade} , '_', string(${maxRFMTemp2},'_',string(${FDFM2})))).

FWIW, I expect the pulldata() function in the following line will be: 

pulldata("ProbabilityOfIgnition", "PIG", "Code", ${lookupCode3})

Thanks for any help.

Best,

Scott

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

There looks to have been a small issue with the lookupCode3 question- the was a  missed parenthesis:

concat(${Shade} , '_', string(${maxRFMTemp2}), '_', string(${FDFM2}))

View solution in original post

3 Replies
JamesTedrick
Esri Esteemed Contributor

There looks to have been a small issue with the lookupCode3 question- the was a  missed parenthesis:

concat(${Shade} , '_', string(${maxRFMTemp2}), '_', string(${FDFM2}))

deleted-user-57QLt_-7NcdX
New Contributor II

Thanks James, I knew it had to be embarrassingly simple.  That said, understanding what exactly the "string" call is doing remains a mystery to me.  For example, other concat functions I've used worked fine without the use of that mid-function end-parenthesis.  Regardless, thanks for the catch!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Scott,

The string() function converts an answer of another type (integer or decimal) into text so that it can be concatenated together.  This is perhaps more understandable when using '+' instead of concat (which, in the mobile app, does the same thing for text as concat):

(Numbers): 5 + 5 = 10

(Text): "5" + 5 = "55" (the second 5 is auto-converted to text and then concatenated together)

(Numbers converted): string(5) + 5 = "55" (the first 5 is made text, and then concatenated with an auto-converted second 5)

All of the above work in the mobile application; it's somewhat permissive in automatically conversion The new webform we are releasing is not permissive and requires explicit conversion.

0 Kudos