I have the user enter a number (in a text field) and I want to automatically add some constant text to what is actually stored because this field will allow me to then easily join this table with my GIS data.
Example: They enter 1234 but I want the final entry in the field to be ABCD-1234. ABCD- is a constant addition.
I'm very new to Survey123 (actually creating in Sruvey123 Connect) so I'm not sure which tab or field to use for this operation.
Thanks,
Sandy
Solved! Go to Solution.
Hi Sandy,
One way to accomplish this is by designing the form using Survey123 Connect and utilizing the calculation column for a question. Take a look at the attached XLSForm to get an idea.
The first question in the form is integer, so, the user would enter the numeric value as you desire '1234'. The second question is a text type as the result will need to be stored as a alphanumeric string.
I have placed a formula in the calculation column in for this question which concatenates the first value '1234' with a '-' and a series of predefined letters 'ABCD'. It looks like this...
concat('ABCD', '-', ${example})
${example} is referencing the value from the first integer question, which has a field name of example. If it is not important for the survey submitter to actually see the '-ABCD' part, you could actually make the question type 'hidden'.
Refer to these documentation resources for further information related to formulas and question types...
Best,
Brandon
Hi Sandy,
One way to accomplish this is by designing the form using Survey123 Connect and utilizing the calculation column for a question. Take a look at the attached XLSForm to get an idea.
The first question in the form is integer, so, the user would enter the numeric value as you desire '1234'. The second question is a text type as the result will need to be stored as a alphanumeric string.
I have placed a formula in the calculation column in for this question which concatenates the first value '1234' with a '-' and a series of predefined letters 'ABCD'. It looks like this...
concat('ABCD', '-', ${example})
${example} is referencing the value from the first integer question, which has a field name of example. If it is not important for the survey submitter to actually see the '-ABCD' part, you could actually make the question type 'hidden'.
Refer to these documentation resources for further information related to formulas and question types...
Best,
Brandon