I am working on connect, attempting to create a survey to be used for entering stream health data / variables of which many are to be given a score depending on the level of quality they indicate.
Thus far I have been able to give values to 'select_one' choices by naming the choices the value that coincides with that choice (as shown below).
I have tried to use this method (above) for the select multiple questions but it did not produce any 'score'
I have also tried the method (below) with ‘if’ statements such as “if(selected(${TrueFlies},Mosquito),3,0)”.
I thought this would equate to if mosquito is selected from the list of true flies then give it a score of 3, if this is false (meaning it is not selected) then value it at 0. However I think this function is possibly not for this type of use.
No score was automatically calculated in the row where I attempted to add all the values and divide it by the number of choices that were actually selected. It's very likely that I am using the wrong methods but I couldn't find anything else that may work.
I am rather new to using survey123 and survey123 connect so I hope my question and aim makes sense.
Thanks
Solved! Go to Solution.
what I have noticed if(selected(${TrueFlies},Mosquito),3,0) is not correct. Please put the Mosquito inside single quotes as this: if(selected(${TrueFlies},'Mosquito'),3,0) and follow this with all other strings in your calculations.
To answer the rest of your questions, could you upload your XLS file to evaluate the questions?
sorry for late as it's busy days for me.
I have modified little bit your XLS form and set int for the bind and changed esri bind into decimal for InvertScore then changed the type to Calculate. Also created another field name Invertebrate Scores to Round the total Score.
Have the attachment and the screenshot
Seems to be working!
Cheers
what I have noticed if(selected(${TrueFlies},Mosquito),3,0) is not correct. Please put the Mosquito inside single quotes as this: if(selected(${TrueFlies},'Mosquito'),3,0) and follow this with all other strings in your calculations.
To answer the rest of your questions, could you upload your XLS file to evaluate the questions?
Hi @SayedWali
Thank you, I updated my strings and that has helped as it is now showing me an output. Unfortunately the output should be a number between 1 and 10, so something is definitely wrong in my calculations (see below).
I have attached my XLS file.
Thanks for your help 🙂
sorry for late as it's busy days for me.
I have modified little bit your XLS form and set int for the bind and changed esri bind into decimal for InvertScore then changed the type to Calculate. Also created another field name Invertebrate Scores to Round the total Score.
Have the attachment and the screenshot
Seems to be working!
Cheers
Thanks both for this workflow, I needed to do something similar for one of my projects and it's worked perfectly! I stuck the round into the calculate for the overall score which is the only difference I had.