Select to view content in your preferred language

Instance Name "Other"

580
4
Jump to solution
09-06-2022 12:21 PM
Marie-AngeFournier-Beck
New Contributor III

Hi! I am guessing this is an easy question to answer for someone out there: I have an instance name for my survey: 

concat(${assessor}, "_", ${project_location}, "_" ,${plot_no}  )


However, in the assessor choice list, I have the option of "other" at which point, another text field pops up in the survey and the assessor can enter her/his name. I can add the ${assessor_other} field into the instance, but then I get the word 'other' before the other assessor's name. Is there a way to not include it, should the assessor_other field be filled out!?

Hope my question makes sense 🙂 

0 Kudos
1 Solution

Accepted Solutions
LaurenceTait
Occasional Contributor II

Or you could put the “if” statement directly into the instance name calculation.

 

If((${assessor} = “other),(concat(${assessor_other}, "_", ${project_location}, "_" ,${plot_no}),(concat(${assessor}, "_", ${project_location}, "_" ,${plot_no}))

View solution in original post

4 Replies
DougBrowning
MVP Esteemed Contributor

One way is create a hidden field in your form with a if(they picked other, use other, use list).  Then use that field in your instance id.  You can also do this trick to store the other choices in the same field.  Usually called the 3rd field trick and it has been posted a few times.  Basically you have a 3rd field that you can put the list choices and other options they typed in all in one field.  Makes data management later way easier.  

Hope that helps

 

LaurenceTait
Occasional Contributor II

Or you could put the “if” statement directly into the instance name calculation.

 

If((${assessor} = “other),(concat(${assessor_other}, "_", ${project_location}, "_" ,${plot_no}),(concat(${assessor}, "_", ${project_location}, "_" ,${plot_no}))

Marie-AngeFournier-Beck
New Contributor III

Thanks @LaurenceTait . That worked, by adjusting the brackets: if(${assessor} = 'other', concat(${assessor_other}, "_", ${project_location}, "_" ,${plot_no}), concat(${assessor}, "_", ${project_location}, "_" ,${plot_no}))

Much appreciated!

Marie

0 Kudos
Marie-AngeFournier-Beck
New Contributor III

Thank you Doug - I definitely need to explore the hidden fields and their use. I'll look into it some more.

0 Kudos