Select to view content in your preferred language

Survey123 Connect - Relevant Group Statements Broken?

364
2
08-25-2023 12:54 PM
neomapper
Occasional Contributor

I have a simple form attached that I would like to simply count if a field has a value and if that value equals 1 than assign that as project status = proposed. I'm running into the issue when I try to set a group relevant statements to key on the project status I am getting the Error Converting XLSForm. I've attached a sample form if anyone is able to help solve this I would greatly appreciate it!

 

 

Adding a Relevant Group Statements keeps showing the Error Converting XLSFor

neomapper_1-1692993234229.png

 

neomapper_0-1692993195566.png

 

0 Kudos
2 Replies
IsmaelChivite
Esri Notable Contributor

The problem is caused by the calculations highlighted in the next screenshot:

IsmaelChivite_0-1692996554436.png

You are creating an end-less cycle:

  • Calculations trigger when the value of the question changes...
  • The calculation says: If you have a choice selected, change the value to 0 or 1
  • Now that you have changed the value, the calculation triggers again...

Another issue is in this calculation:

 if(${num_selected} = 1, "proposed",if(${num_selected} = 2, "callback", "unknown"))

The num_selected question is a note question type, which is by default a text value, but you are comparing against a number: ${num_selected} = 1

It will be better if you do this:

  •  if(${num_selected} = "1", "proposed",if(${num_selected} = "2", "callback", "unknown"))

Other than that, your form works as I think you would expect.

0 Kudos
neomapper
Occasional Contributor

What types of calculations would work in the first scenario? I still feel like I am hitting a road block on this one. Thanks

0 Kudos