I'm currently scripting a survey where I need to ask two numeric question Q037 and Q038.
The first question (Q037) is asking what is the highest acceptable price that someone would pay for a coffee machine.
The second question (Q038) is asking what is the lowest price.
I have scripted the questions and I have applied a Question validation equation: sum(self.NAOK) < sum(that.Q037.NAOK) to question (Q038) to make sure that in the second question the respondent would not enter answer higher than the one in the first question.
In addition I have added in the question text the following expression:
{if(sum(self.NAOK) > sum(that.Q037.NAOK),"Please correct your answer. Your answer should not exceed {Q037}.","")}
The issue is that no matter what I have tried the value from question Q037 is not shown (marked in Orange). I believe that this is due to the fact that {} are used twice.
Could you please advise how to proceed in order to show the value from question Q037 in the question text?
I believe that this is due to the fact that {} are used twice.
You are right.
You should do it like this.
{if(sum(self.NAOK) > sum(that.Q037.NAOK),"Please correct your answer. Your answer should not exceed "+Q037+".","")}