How do I pull characters out of a string in Survey123?

3644
2
Jump to solution
05-06-2020 02:52 PM
AaronFisher3
New Contributor

Is there a way in Survey123 to pull characters out of a string.  For example, the answer to question 1 is "ABC123".  I want another question to automatically pull "ABC" from that text.

A calculation like LEFT(${Question1},3) is what I was hoping for, but I can't find an option or correct syntax.

My survey is also connected to a Collector map via a pop-up link.  This text is pulled into the survey via the link.  I have tried using an attribute expression to get the character I need.  ex:"Left($feature.ATTRIBUTE1, 3)"  This does pull the characters, however, I cannot seem to pass the expression results to Survey123.

An example link for collector to survey for what I've tried:

arcgis-survey123://?itemID=4abe30290a954139bc5f2d7eirnfq9b5&field:Question2={expression/expr1}

0 Kudos
1 Solution

Accepted Solutions
Jing_Sun
Esri Contributor

Hi Aaron,

I think the function you are looking for is substr().

More information can be found on the Formulas page.

Formulas—Survey123 for ArcGIS | Documentation 

Cheers,

Sun

View solution in original post

2 Replies
Jing_Sun
Esri Contributor

Hi Aaron,

I think the function you are looking for is substr().

More information can be found on the Formulas page.

Formulas—Survey123 for ArcGIS | Documentation 

Cheers,

Sun

AaronFisher3
New Contributor

Thank-you for this!

0 Kudos