rosine
January 19, 2022, 1:57pm
#1
Hello,

My form on kobo keeps showing this error every time i try to preview it:

FormLogicError: Could not evaluate: Total Score:, message: not sure how to handle expression called on nodeset that doesn’t start with a ‘/’: Score:{“stack”:[{“t”:“root”,“tokens”:[{“t”:“arr”,“v”:[]}]}],“cur”:{“v”:“Score:”}}
Can you help?

Welcome to community @rosine ,

I’m guessing you are using `if statements`

but your syntax is not right.

Can you show a screenshot of the questions you are calcuating your `Total Score`

and `Score`

?

1 Like

rosine
January 20, 2022, 6:17am
#3
I am not sure why is its showing Total Score and Score, they don’t show anywhere in my form.

I have out conditions to show some questions based on the response from the previous ones, could that be where the problem is?

@rosine It could be. Is it possible to share your form in xls format? So we can take a look into that?

1 Like

rosine
January 20, 2022, 6:23am
#5
@hakan_cetinkaya I think i have seen where it is, i added the question for Total Score as a calculation, but did not put a formula. I wanted to add the scores for all the questions in the group, to display at the end of the survey. I am not sure if it is possible in Kobo.

Thanks a lot for your help!

1 Like

Hi @rosine glad you solved your problem.

Considering your last question. If I understand you correctly there are some ways to `calculate`

and `display`

that calculations at the end of the survey.

You can check these topics:

Hello @asif_rahman_joy ,
Recently I have to do a similar thing that might help you.
I’m suggesting to define some if conditions for all of the age groups, and summing up at the end of the form.
For example adding calculate questions for your age groups, like if( {age} <5, 1, 0 ) will result in 1 if the age is below 5 and 0 otherwise -which you can sum at the end of the form-
You might want to check these articles:
First article which shows how to create Dummy Questions and the second one sh…
@danishjownaqibullah Yeah you are absolutely right. max() will only provide the value.
I’m thinking about some if functions, like if(max(X) = ${Q1}, $Q1, max(X) = ${Q2}... what do you think?
And this article from Help Center:
https://support.kobotoolbox.org/advanced_calculate.html

Hope these help you further.
And if they don’t you can always ask in here.
Best,

2 Likes