Hi All,
I have a form that uses a condition based on one of the "select_one" fields in my survey.
This is the condition I'm using in the "calculation" field.
if(selected(${applicant_name},'Bell_Canada'),'BC-' + format-date(${_date},'%y') + '-CA-','None')
Basically, if "Bell Canada" is selected, the field calculate will insert "BC-21-CA" into the "application_number".
This works well in Survey123 Connect, however, when I try it in the browser, the field shows "NaN".
Not sure why this is and any info to rectify this issue would be much appreciated.
Thank you,
Ruchira
Solved! Go to Solution.
I wonder if you need to use concat() instead of + for the web? I may remember seeing that.
I wonder if you need to use concat() instead of + for the web? I may remember seeing that.
Thanks, Doug! That worked. Like you said, concat works on both the web and connect.
I had this issue we well. In connect and the preview screen. You can add together strings with the + sign. On a web browser this breaks and you get Nan as an error.
(${selected_cd1} + ',') works fine in connect, does not work in a browser
concat(${selected_cd1},',') , '') the work around is to use concat, works both in connect preview and the browser
Yeah, quite odd. I'm glad the concat work around exist though. Really saved my behind!