Select to view content in your preferred language

Conditional formulas for select_one questions not auto calculating if question is required

1314
5
08-01-2023 05:05 PM
LMedeirosUI
Occasional Contributor II

I have a survey that uses conditional formulas to auto populate answers to some "select_one" questions. These used to auto calculate, but recently they stopped doing so (at least for me). After some troubleshooting I pinned it down to whether or not the question was required - make it not required and it auto calculates as expected.

I tried the various calculation modes, but the only one that worked was "always" and that made the answers recalculate when using the Inbox.

I also moved all of my relevant statements to the esri::body::visible column.

Is this a bug? Or am I doing something that's causing this? My XLS form is attached. Please also see the attached screenshot for an example of one select_one question that is required (Pit Tag Status) and won't calculate unless I hit the refresh button while the other select_one question (Fish Status) auto calculates.

LMedeirosUI_0-1690934671889.png

I am using Survey123 Connect.

0 Kudos
5 Replies
abureaux
MVP Regular Contributor

I am curious about the answer to this myself (I assume it's a bug), and have noticed similar behaviour.

Did you notice things things working as expected in Connect, but not the Field App (this is something I've encountered)?

0 Kudos
LMedeirosUI
Occasional Contributor II

@abureaux  I've noticed it in both, but only after I updated my XLSForm Template version to 3.18.

0 Kudos
IsmaelChivite
Esri Notable Contributor

I was able to repro. The problem is the combination of repeats, required and calculations. The attached XLSForm illustrates the problem. A 'required' 'select_one' within a 'repeat' will not automatically calculate. I shared this internally within the team. However, logging this is a BIG via Esri Tech Support will help others track it. 

This has been documented BUG-000147586 - Required questions in repeat not receiving calculation on form load

0 Kudos
LMedeirosUI
Occasional Contributor II

@IsmaelChivite  Thank you for bringing that to the team. If it helps, I only noticed this after updating my XLSForm Template version to 3.18.

0 Kudos
LMedeirosUI
Occasional Contributor II

Hi @IsmaelChivite That bug specifies the problem for integer and decimal questions and that the question be required and read only in Apple iOS. At least the description I can see.

Can you confirm that the tech support team knows the calculation is also not being passed through for select_one questions that are required but not read only? Basically it seems a bit more widespread than the bug description, which is over a year old. The suggested workaround of removing the required flag does work, but I (obviously) do not have the option of changing the question type to note. At the same time, removing the required flag is undesirable.

This can be replicated in Survey123 for Windows, Android, and iOS as well as the testing interface of Survey123 Connect for Windows. I work for a government organization.

0 Kudos