Concatenate returns string instead value of variable

Hi all,

When I concatenate two variables into one the result is a string instead the value of this variable:

concat('$','{','option', ${C09}, '}')
result is: ${option1} instead the value of ${option1}

Attached is the form which demonstrates the problem. I run this on SurveyCTO.

Many thanks in advance!

test_problems.xlsx (87.3 KB)

concat as you wrote it return a string that is ${option1}.
Concat function always return a string that is the concatenation of the argument inside the parenthesis.

I think you can get the result wanted with an if instead as per the attached xls.

I think there is still an error on prob_id1 ( I didn't understand what do you want to do with it. I just changed the value to make it convertable to xform).

test_problems.xlsx (87.3 KB)

Many thanks @aurdipas. The if statement works well - I tried it before as an alternative to concat but apparently did not manage well the syntax.

PS. You're right - prob_id1 contains an error - just a mix up from a larger form - sorry for the confusion.