I have created a survey in survey 123 connect. I would like respondents to answer questions about their total internet usage. The questions are currently stored on 4 lines (the first line is read only) and I would like the responses to add up to 100. Is this possible with a calculation in the constraint column or by some other means?
Solved! Go to Solution.
Yes I do this a lot.
Create a read only field call Total %.
Add then up in the calculation column can use float also if needed or use the bind to int. Mine are 10,20,30 etc choice box so this works
int(${BankVegCoverFoliar}) + int(${BankCobbleCover}) + int(${BankLargeWoodCover}) + int(${BankBedrockCover})
Put a constraint on the Total field of
.=100
Hope that helps
Yes I do this a lot.
Create a read only field call Total %.
Add then up in the calculation column can use float also if needed or use the bind to int. Mine are 10,20,30 etc choice box so this works
int(${BankVegCoverFoliar}) + int(${BankCobbleCover}) + int(${BankLargeWoodCover}) + int(${BankBedrockCover})
Put a constraint on the Total field of
.=100
Hope that helps
If I use the keypad widget to select integers, but then do not pick a number it clears the value for that field.
I've event set the default value of each integer field to zero.
Even casting the empty value as an int i.e. int(${fieldname}) and setting bind:type to int allows me to bypass this validation.
Any suggestions?