Using a condition with xlsform

What is the problem? Please be detailed.

What ODK tool and version are you using? And on what device and operating system version?

What steps can we take to reproduce the problem?

What you have you tried to fix the problem?

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.
Hello. I am new to using XLSFrom.
My issue is the following:
I created a form for entering the varaibles of chemical that must be completed each week to give a monthly total.
on this, the end user makes me understand that he has months where we get to have 5 weekends and that forced me to put together a question to check if the user is with 5 weeks or week-end end as well as the answer to this question is: yes or no
when it is equal to yes: the input field appears and indicates the value and we proceed to the calculation in a calculation type field which takes the sum of all the values ​​entered for each week.
there is no problem but when the user answers the question no, the calculation is not done because the form returns the value 'no' in the field of the fifth week that prevents to do this calculation.
so I tried to force the value of the 'val_s5_sfte' field to zero using this "if ($ {val_s5_sfte} = 'no', '0'}" but ONA does not validate this.
I attached the screenshot of my XLSForm and the error at ONA.
Please help me out of this loop. I use the version: ODK Collect V1.12.2.

français:

Bonjour. je suis nouveau dans l'utilisation de XLSFrom.
mon problème est le suivant:
j'ai crée un formulaire pour la saisie des varaibles de produit chimique qui doit être remplit chaque semaine afin de donner un cumul mensuel.
sur ce, l'utilisateur final me fait comprendre qu'il a des mois ou nous arrivons à avoir 5 week-end et cela m'obligé a mettre sur pied une question pour vérifier si l'utilisateur se trouve avec 5 semaines ou week-end ainsi que la réponse à cette question est: oui ou non
quand c'est égal à oui : le champ de saisie apparâit et indique la valeur et on passe au calcul dans un champ de type calcul qui prend la somme de tout les valeurs saisie pour chaque semaine.
là il n y a pas de problème mais quand l'utilisateur répond à la question par non, le calcul n'est pas effecuter parce que le formulaire renvoi la valeur 'non' dans le champ de la cinquième semaine cela empêche de faire ce calcul.
j'ai essaye donc de forcer la valeur du champ 'val_s5_sfte' égal à zéro en utilisant ceci " if ($ {val_s5_sfte} ='non', '0'}" mais ONA ne valide pas cela.
j'ai joint la capture d'écran de mon XLSForm et l'erreur chez ONA.
Prière m'aider à sortir de cette boucle. j'utilise la version:ODK Collect V1.12.2.

Hi @fbopamu
Probably your problem is just a wrong if statement. You have

but an approprite construction contains one more parameter used if a condition is false. In your case it could be:
if ($ {val_s5_sfte} = 'no', '0', ${original_value}}

Agreed. I'd fix the following:

$ { --> ${

and

non --> 'no'

In the case of "0", I personally use 0 rather than '0'. That should be syntactically correct and evaluate to "false". If you were to change it to '0', I think it will also evaluate to "false", but I'm not 100% sure.

@Grzesiek2010
. ok i try