How to score using colors in kobo collect

Hello Team,
Am trying to implement the attached as guided Changing color based on score
but getting an error in the form builder

Any help will highly be appreciated

@danoti, would you mind sharing the error message that you get? Maybe the best approach would be that you try out the sample xlsform and get used to with before starting a new one.

Many thanks @Kal_Lam

Attached is the error that I get

1A_F.xlsx (19.2 KB)

@danoti, would you mind validate your xlsform through this online validator to see if you are able to find any syntax issues?

Many thanks again @Kal_Lam
The validator is throwing the same error as highlighted above.
Am still stuck any help will highly be appreciated

Many thanks once again

OK, have you checked this out with the Collect android app?

Many Thanks @Kal_Lam
I am having a little trouble in my logic. If statement takes 3 parameters thus if yes then this color else the alternative. This I have implemented so well as per the guidance. Now the challenge is Yes in Q1 cannot skip to Q2 without outputting a color. What I need is a code that if N then Red then it ends but if its Y then it moves to Q2

Many Thanks

Hi @Danoti
Are you confirming that you have checked this through the validator? When I look at your formula

if((${Q1_HQ_QI} =2), ‘N’, if((${Q1_HQ_QI} =1), ‘<span style=”color:Dark Green”>Y’,"))

You seem to only have two conditions, if that is the case, then consider using
if((${Q1_HQ_QI} =2), ‘N’, ‘<span style=”color:Dark Green”>Y’)

You have not added added a skip logic at Q2; could you have a look at this article

Stephane

1 Like

Thanks @stephanealoo
The xls shared earlier missed the relevant bit.
I have implemented your code but its giving the same output
What I want is on clicking Yes you are taken to Q2 directly without taking you to the output then to question2

if there away in the if statement one can have move to q2 as a parameter

I will appreciate any help
Once again Many ThanksTest.xlsx (19.9 KB)

@danoti, so all you need to do at this phase is manage your skips. You could do it as outlined in the image shared below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

Reference xlsform:

Test.xlsx (13.1 KB)