Select to view content in your preferred language

How can I update all questions to true on submission of a form

144
1
a month ago
EmersonBarrera
Emerging Contributor

We have been encountering a submission error when a question is set to "No" or 0. Apparently, we can bypass this issue by replacing "arcgis-survey123" with "https://survey123.arcgis.app". This creates a new user experience that opens the new link in a browser first and requires a click on "Open" to proceed to the new Form.

My question is, is there a way to make all Questions in the form to be set as "Yes" or 1 so that the link is set to blank. In this case, we should not get an invalid HTML error.

The Breach would have been submitted, and I don't need to capture the answer to any of the questions.

Could you please provide a sample code or steps to achieve this?

if(${Q20}='0', concat('<a href="arcgis-survey123://?itemID=',${breachid},'&field:spi_job_no=',${spi_job_no},'&field:spi_ass_no=',${spi_ass_no},'&field:zwojobnum=',${zwojobnum},'&field:org_name=',${org_name},'&field:task_rid=',${task_rid},'&field:contact_id_breach=',${contact_id_breach},'&field:spi_breach_no=31&field:qtext=Weeds%20and%20Pests%20/%20Cultural%20heritage%20/%20HCV%20or%20EVNT%20-%20compliance%20with%20standard%20duty%20of%20care%20responsibilities%20and%20any%20specific%20directions%20in%20the%20Operations%20Plan.&field:breach_desc=FAILED: Weeds%20and%20Pests%20/%20Cultural%20heritage%20/%20HCV%20or%20EVNT%20-%20compliance%20with%20standard%20duty%20of%20care%20responsibilities%20and%20any%20specific%20directions%20in%20the%20Operations%20Plan.','">Open QABreach</a>'), "")
0 Kudos
1 Reply
ChristopherCounsell
MVP Regular Contributor

There are a few issues with your survey.

  • You need to update your Survey123 Connect and XLSForm templates. You are on a much older version.
  • Copy-pasting values has rendered the formatting invalid. e.g. C9, it's giving you a database field name issue in the label column. This is because you've copied a cell from column B into column C. In future right-click and select 'paste values only' to help ensure data validation.
  • As above, you've got 'end' as a field name. End is on the reserved words list and will give you issues down the track. The above data validation would have fixed that.

Overall I'm not a fan of the survey. Linking from one survey to another survey within the form is not a good user experience and this one has so many.

But to fix your problem:

  • Each 'note' question will only create a field and store values if you give it a question name. 
  • You have given them question names, so fields would be created. It's trying to submit the calculated link against the field.
  • You can fix this by removing the field name or setting the bind::esri:fieldType to 'null' for each note question where you don't want to submit the link as a value.

 

 

0 Kudos