How to make 0 a default value before select yes = 10 and no = 5

if Yes = 10 and No = 5, but before choosing any of the two options which will provide auto-filling of the next column either 10 or 5 respectively, I need to have Zero("0’) as a default answer. what calculation should be used? I am using this at the moment if(${r3} = ‘yes’,10,5)

Hello @ma_cabealawa,
You can use a cascading if:
if( … = ‘yes’, 10, if( … = ‘no’, 5, 0) ).

Side-note: Why do you want to set 0. If it is for the sum calculation, you could use the coalesce function
see ODK XForms Specification

1 Like