What is wrong with my if-statement

please correct this for me
If(${stockOnHand} = 0, ${dispensingSiteStock} = 0, then “Stockout” else “Stocked”)
Thanks

Would you mind to have a look at the correct syntax for if expressions, please: ODK XForms Specification
There is no “then” or “else” as textual element.

1 Like

@wroos can you please write out how it should be for me?
Sorry, I’m completely new to this :blush:

@kingsaks, we have a list of community discussions on the same topic here. Maybe you could leverage from the workarounds shared/discussed previously.

Maybe you could have a closer look at this post discussed previously (to have a quick understanding of how the if-statement is used):