Is it possible to use an if then statement to populate the answer to another question?

1720
2
Jump to solution
10-26-2016 12:37 PM
HeathAnderson
Occasional Contributor II

I have a series of questions about the exterior of a house such as: roof, gutters, siding, chimney, foundation, etc.  Each question can pick from a list (select_one), 1 (Intact), 2 (Replace), 3 (Remove).  Can I create a select_all_as question so that if they choose 1 from the list as “Intact” it will populate all the remaining questions, roof, gutters, siding, chimney, foundation, etc. as 1?

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Heath, 

Currently we don't support calculating values on a select_one question.  For what you're trying to accomplish, I think there is another way that might work.  There is a function called coalesce that allows you to get 'the first non-empty value in a set of questions'.  This can be used in combination with relevancy to hide/show all or the individual responses and then get the response for use in another field.  See the attached XLSForm.

View solution in original post

0 Kudos
2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Heath, 

Currently we don't support calculating values on a select_one question.  For what you're trying to accomplish, I think there is another way that might work.  There is a function called coalesce that allows you to get 'the first non-empty value in a set of questions'.  This can be used in combination with relevancy to hide/show all or the individual responses and then get the response for use in another field.  See the attached XLSForm.

0 Kudos
Fisher_Austin
New Contributor II

Is there a source for more details on the "coalesce" and other similar functions?

0 Kudos