We are collecting data on fish’s growth,
the questions asked to respondent using kobo collect app are.
1. Input the length (cm) of your fish.
2. Input the weight (g) of your fish.
|Fish Length (cm)
||Fish Weight (g)
After respondent enters the inputs, The next steps are,
- If the length is not a multiple of 5, then get the 2 nearest lengths (one less than the input length, and another greater than the input length) from the standard table,
- Once the 2 nearest lengths are identified, using interpolation the weight is calculated with the weights from table.
- the calculated weight is then compared with the input weight
- if the input weight is having +/- 10% difference; A note is displayed to the respondent, that the fish are growing fine. if not, it will tell “fish are not growing properly”
Apologies ahead, if I am asking too much, I am exploring, and would like to learn from experts.
@imran, this seems interesting. Could you kindly share
dummy questions and
dummy responses along with the criteria you wish to have? Maybe on that way, the community would be able to understand your issue and help you out.
A workaround could be to enhance the table to 1 to 100 cm (=100 rows), with duplicate values for the reference weight (allowing choice duplicates in the settings).
You can then get the corresponding weight with the search() function (or instance Xpath expression). Another option would be to put the weight as choice label and the length as name, so you could use the jr:choice-name() function, see
ODK XForms Specification.
You might also use an external csv file for your length / weight reference table.
Are you using Collect or Enketo (web form)?
Thank you for your suggestion, will try to do that, I am using Kobo Collect.
My objective was to show the respondent, how well their fish was growing compared to standard.
Could you also suggest me on, how can i show it in an effective way?
My first though was to show it in graph, but the community told me that was not possible. hence i am Looking for other workarounds. could you suggest me in that area aswell ?