Sum a space separated number question and use result to define relevance for another question

I have the main question where you can enter space-separated numbers (example: 1000 2000 3000)

Is there a way to sum the entered numbers and use them to define relevance for another question (example show next question if 1000+2000+3000 > 10000)

I have tried using item-at with index and it doesn't work.

I have attached my excel file, relevance should be in row 4 of the survey tab.
large_transaction.xlsx (11.9 KB)

welcome @Carolk on the ODK forum. We you get a chance please take some time to introduce yourself here
We have the same need to compare a integer value with the sum of selected value in a select_multiple displayed as an image map. In fact to compare à turtle ID to the code marked on its shell.
Will try to find a way.

Hi, @mathieubossaert thank you for being so kind to respond. There is always a solution, am sure we will find it somehow!

@Vivian_Inereli and I found two solutions, from the forum.
The first one needs you to know the number of selected values in your select_multiple (wich is the same a space separated values) and use one calculate of selected-at per value :slight_smile: Calculations on select multiple - #5 by Naveen_Agarwal

select_multiple_options_sum_without_sum_function.xlsx (7,7 Ko)

And the second one calculate the number of selected values, and within a repeat, iterate to get each individual value. Outside the repeat we use the sum() function.
select_multiple_options_sum_with_sum_function.xlsx (15,8 Ko)

1 Like