Hi everyone,
I am trying to build a calculate question into my form. I have three questions that require a number answer and want to add an addition of those three number answers like so:
QUESTION FIELD:
Do you have a written constitution accepted and approved by all the members of the organization? 1 - No Constitution; 2 - Some rules/principles written down; 3 - Written constitution exists but it is not approved; 4 - Written constitution approved by the board
ANSWER FIELD:
[Number}
···
QUESTION FIELD:
Do you have a committee/board that meets and makes decisions that guide your organization’s development? 1 - No board, no meetings; 2 - Board established but it never meets; 3 - Board occasionally meets 4 - Board meets regularly (quarterly) with useful guidance and decisions made for the organization
ANSWER FIELD:
[Number}
QUESTION FIELD:
Do you have a mission and set of values which are clearly understood, agreed and approved by all the members of the organization? If so, how are they used? 1 - No clear mission/values; 2 - Can describe the mission/ values of the organization, but they have never been agreed or written down; 3 - Mission and/or values written down long ago, but few people were consulted or understand them now; 4 - Mission and values were agreed and approved by board and are regularly used to guide decisions about projects and activities.
ANSWER FIELD:
[Number}
As next step, I want the form to add the three values, so I added a “Calculate” tab with the following title (with the names in set braces being the names assigned to the prior three questions):
${constitution} + ${governingb} + ${mission}
I thought this was enough for the calculation to take place but when I redeploy my form, I get the following error:
Unexpected KoBoCAT error 400: {"detail":"ODK Validate Errors:\norg.javarosa.xform.parse.XFormParseException: Invalid calculate for the bind attached to \"${calculation}\" : Couldn't understand the expression starting at this point: Calculate��aValue in expression Calculate a Value\n\n>> XForm is invalid. See above for the errors.\n\nResult: Invalid"}
I am not sure where the problem is - can you help?
Thanks!