Form Logic Error - Hidden Repeat

1060
8
12-02-2022 02:05 PM
alyssajhnsn
New Contributor III

I'm trying to develop a survey with multiple repeats. It works fine in Survey123 Connect, but when it's published and I try to use it in a web browser, it displays the following error message.

  • FormLogicError: Could not evaluate: /model/instance[1]/Form_3/survey_type = 'Interview' or /model/instance[1]/Form_3/permission_to_survey = 'Yes', message: Failed to execute 'evaluate' on 'XPathEvaluator': parameter 2 is not of type 'Node'.

None of the repeats are working or showing in the browser. All work in Survey123 Connect before it's published.

Any help would be appreciated.

alyssajhnsn_1-1670018680255.png

 

0 Kudos
8 Replies
IsmaelChivite
Esri Notable Contributor

Hi @alyssajhnsn  You will need to share your XLSForm for anyone to be able to help you. If you do not want to post your XLSForm file publicly in this forum, our Esri Technical Support team will be happy to help if you open a ticket.

alyssajhnsn
New Contributor III

Attached.

0 Kudos
JenniferAcunto
Esri Regular Contributor

Why do you have ${survey_type} = 'Observation' or ${permission_to_survey} = 'No' or ${confidently_count} = 'Yes' in the bind::type column? If you are trying to control when the repeat is displayed you need to use the relevant or the body::esri:visible columns.

- Jen
alyssajhnsn
New Contributor III

I honestly was trying to move it around between relevant and various places trying to get it to work. I opened a tech support case and rebuilt the survey from scratch. It's some issue with having calculations or anything in the repeat_count column for the repeats.

0 Kudos
IsmaelChivite
Esri Notable Contributor

@alyssajhnsn  While there are some issues in the Survey12 design, as highlighted by @JenniferAcunto, the fundamental problem is caused by what looks to be a BUG in the software. We are still investigating the root cause. At first sight it seems to be related to the combination of repeats, with repeat_count, relevant statements and the minimal appearance. 

I suggest you open a Tech Support Incident so this is logged more formally. We will continue researching on our side to understand the problem better.

0 Kudos
IsmaelChivite
Esri Notable Contributor

@alyssajhnsn   We made some progress with this. The software defect is logged as 

BUG-000153480 If a question outside the repeat is using the same relevant expression as a begin repeat with minimal appearance, the ArcGIS Survey123 web app 3.16 returns the error message...

We are aiming at addressing this in February 2023. In the meantime, avoid repeats with both repeat_count and a relevant expression.

I made minimum changes to your design to get it going. See the file attached to this message. I removed the repeat_count.  As an alternative to repeat_count, you could build some logic to display a message if the number of records in the repeat does not meet criteria. You could also use a constraint, on top of the warning note, to make the collection more robust.

Sorry for the bump with this. Hopefully you can take it from here.

0 Kudos
ElijahOwoseni
New Contributor

Hello @IsmaelChivite, I have similar challenge as @alyssajhnsn. What is the update on the loggeded defect "BUG-000153480"? . 

Screenshot (15).png

Initlally, I  thought  the error occurred because of long field names, but the field names were less that 31 characters. I have reduced the length of name fields and also explicitly converted calculate question type to integer for use in repeat_count the error still persist. 

In my case, adding the repeat question, which has a repeat_count and relevant expression, prevents other prior questions from being displayed. I removed the repeat group and discovered they displayed well. So does it imply that, at the moment, I can't use dynamic repeat_count and relevant expression in our survey? I would appreciate a workaround.  This is the link to the survey FGM 

Thanks

Elijah.

 

0 Kudos
ZhifangWang
Esri Regular Contributor

Hi @alyssajhnsn @ElijahOwoseni ,

BUG-000153480 has been fixed in Survey123 December 2022 Update. Can you please confirm if the original issue got fixed in your workflow? You may need to republish the survey in Survey123 Connect 3.16 or above.

0 Kudos