I want to use Hidden for a multiple choice question but it breaking the XLSM

338
2
Jump to solution
09-06-2022 01:58 PM
AnaMariaG
New Contributor II

Hi, 

It's me again.

I don't know what I'm doing wrong but is not working the hidden feature for a multiple choice question

This is the error: b'ODK Validate Errors:\n>> XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: Invalid calculate for the bind attached to "${ATD1}": Bad node: org.javarosa.xpath.parser.ast.ASTNodeAbstractExpr@ec756bd in expression if(selected(${Aspectos_TD},\'ATD1'\)1,0)\n\nResult: Invalid'

This is the code in XLSM

AnaMariaG_0-1662497828158.png

I'm placing the If in calculation 

This is the list that is on choices:

AspectoTDATD1Apropiación de tecnologías emergentes
AspectoTDATD2Gestión de cambio cultural
AspectoTDATD3Liderazgo (desde la JD)
AspectoTDATD4Educación Continua

 

Does anybody know whats going on? 

I would really appreciate your help.

Kuddos,

 

Ana

0 Kudos
1 Solution

Accepted Solutions
Katherine_Clark
MVP Regular Contributor

So, I think you might just need an extra comma, I added it in red below:

if(selected(${Aspectos_TD}, 'ATD1'),1,0)

Best,
Katherine

View solution in original post

2 Replies
Katherine_Clark
MVP Regular Contributor

So, I think you might just need an extra comma, I added it in red below:

if(selected(${Aspectos_TD}, 'ATD1'),1,0)

Best,
Katherine
AnaMariaG
New Contributor II

THANKS, It works ❤️

0 Kudos