Select to view content in your preferred language

Select_Multiple and Field Calculations

902
1
Jump to solution
11-30-2018 01:28 PM
deleted-user-jxpbpbjlZInj
Deactivated User

I have a select_multiple question in my Survey123 where a field worker can select multiple defects on a tree. Then, a later question asks if there are multiple defects on the tree. If yes, then that gets a score of 1. If it's just one defect, that gets a score of 0.

I want this question to automatically calculate based on the select_multiple for tree defects. How would I calculate this?

0 Kudos
1 Solution

Accepted Solutions
deleted-user-jxpbpbjlZInj
Deactivated User

Oh look at me go! I answered my own question. I had a field called "Hazard Rating" that I was trying to automatically calculate based on a multiple_select question called "Fail_Potential". In the calculation for Hazard Rating I put this:

if(count-selected(${Fail_Potential}) = 1, ‘0’, if(count-selected(${Fail_Potential})>1, ‘1’, ${Fail_Potential}))

AND IT WORKS! 

View solution in original post

0 Kudos
1 Reply
deleted-user-jxpbpbjlZInj
Deactivated User

Oh look at me go! I answered my own question. I had a field called "Hazard Rating" that I was trying to automatically calculate based on a multiple_select question called "Fail_Potential". In the calculation for Hazard Rating I put this:

if(count-selected(${Fail_Potential}) = 1, ‘0’, if(count-selected(${Fail_Potential})>1, ‘1’, ${Fail_Potential}))

AND IT WORKS! 

0 Kudos