Closed JeroenJADS closed 7 months ago
@JeroenJADS You have to create a custom function, register it in SurveyJS and then you can reuse it in any expression. Please take a look at "getPrice" at the following example. It is very close to what you are looking for. You will need to change the following code:
var question = !!this.row ? this.row.getQuestionByColumnName(params[0]) : null;
to
var question = !!this.row ? this.row.getQuestionByColumnName(params[0]) : this.question;
Or review another example.
Thank you, Andrew
Are you requesting a feature, reporting a bug or asking a question?
Question
What is the current behavior?
When using CalculatedValues like
the outcome of this calculatedvalue is automatically the 'value' property of the selected question answer.
In our setup we have a custom property added to itemvalue called 'Score'. Is it possible to instead of always using the value property in a CalculatedValue use the "Score" property of the answer?
Using the "value" property wont suffice, since the value property can't be identical between rows in a question, even though the score of the answers could be identical.
What is the expected behavior?
This could work like
How would you reproduce the current behavior (if this is a bug)?
.
Specify your