Select to view content in your preferred language

Web Browser public question not pulling data/functioning

1024
5
Jump to solution
03-28-2023 03:23 PM
3CDCOrganizationalAccount
Regular Contributor

Hello S123 Community,

I am making an incident report for my organization and we are trying to make one report for our 2 difference public facing departments (1 of which uses Survey123 everyday and has the app and one never uses ESRI products). I made a survey and published it publicly so that we could start testing it out and I noticed that some of my choice filters, pulldata() calculations, and autocomplete appearances questions were not functioning in the web browser, but they are functioning in Connect and when I use the survey within the application.

Choice Filters: The first questions is whether this survey is for our Ops Team or Garage Team and that influences the possible locations within the choice filter layer. This for some reason is being changed into a normal text box it appears as opposed to an autocomplete appearance.

pulldata(): Furthermore, these locations do appear as an autocomplete in the location question before I select either Ops or Garage, but they do not pull the lat/long information from the CSV. To mark on the map which location we are referencing.

I went ahead and attached the CSV of garages and a draft of the Incident Form. I know that the web browser is a lot more particular than the app/connect, but any help would be greatly appreciated!

0 Kudos
1 Solution

Accepted Solutions
Vinzafy
Frequent Contributor

Hey there, 

Thanks for adding your .csv and form! Helped a lot. I seem to have it working on my end in both S123 Connect and the corresponding Web Form.

Vinzafy_1-1680104965281.png

The changes made were the following:

CHOICE LIST

  • This one was a simple fix! In the choices worksheet, I changed the name of column D from 'Incident' to 'Incident_Loc', then updated the choice_filter formula in cells O8 and O17 to be selected(${incident},Incident_Loc).

  • I have a feeling S123 was getting the choice filters mixed as the first question is named 'incident' and there is also a list_name on the choices worksheet named 'incident'. Giving it a unique name seemed to work. 

 

GEOPOINT QUESTION

  • In this case, the locationCal calculate could actually be simplified. From Ismael's example here, he used the substr() function as he was pulling from a value that had the full coordinates in it. As you're pulling data from the csv for the lat and long individually, you actually don't need a substring calculation.

  • One of the things I did to troubleshoot was add a null note question for the locationCal to see what was being generated. In S123 Connect, this looked fine. However in the web form, it returned an NaN value.

  • I changed the calculate as seen below and that seemed to work:
    • substr(${latCal},0,12)+' '+substr(${lonCal},0,13) 
      to
      concat(number(${latCal}), ' ', number(${lonCal}))

  • The geopoint question called ${locationCal} as before. 

Hope that works on your end too!

View solution in original post

5 Replies
Vinzafy
Frequent Contributor

Hey there, 

Thanks for adding your .csv and form! Helped a lot. I seem to have it working on my end in both S123 Connect and the corresponding Web Form.

Vinzafy_1-1680104965281.png

The changes made were the following:

CHOICE LIST

  • This one was a simple fix! In the choices worksheet, I changed the name of column D from 'Incident' to 'Incident_Loc', then updated the choice_filter formula in cells O8 and O17 to be selected(${incident},Incident_Loc).

  • I have a feeling S123 was getting the choice filters mixed as the first question is named 'incident' and there is also a list_name on the choices worksheet named 'incident'. Giving it a unique name seemed to work. 

 

GEOPOINT QUESTION

  • In this case, the locationCal calculate could actually be simplified. From Ismael's example here, he used the substr() function as he was pulling from a value that had the full coordinates in it. As you're pulling data from the csv for the lat and long individually, you actually don't need a substring calculation.

  • One of the things I did to troubleshoot was add a null note question for the locationCal to see what was being generated. In S123 Connect, this looked fine. However in the web form, it returned an NaN value.

  • I changed the calculate as seen below and that seemed to work:
    • substr(${latCal},0,12)+' '+substr(${lonCal},0,13) 
      to
      concat(number(${latCal}), ' ', number(${lonCal}))

  • The geopoint question called ${locationCal} as before. 

Hope that works on your end too!

3CDCOrganizationalAccount
Regular Contributor

First off @Vinzafy thank you so much for answering my question! That was a big help and everything is working now in that survey. 

 

I have another similar question I think because I tried to change another survey where I used substr(${latCal},0,12)+' '+substr(${lonCal},0,13) and now I am having similar issues with this survey where the XLS form is not pulling the CSV information we need from a list of local businesses that our staff check in on. 

 

The specific part that is not working is the pulling lat and long for the geopoint question after you answer that it is a business check. I added some notes to see if it was pulling the data at all and was not able to get any information from the file. 

 

Its weird because the only thing I changed was substr(${latCal},0,12)+' '+substr(${lonCal},0,13)  to concat(number(${latCal}), ' ', number(${lonCal})) and I added a few choices then the pull data calculation stopped working...

 

Any help is appreciated!

Vinzafy
Frequent Contributor

Sorry I haven't had a chance to look at this yet! This week has been a busy one with an important deadline tomorrow. I'll definitely take a look at this when I get a chance and hopefully be able to troubleshoot what's happening in this case.

0 Kudos
3CDCOrganizationalAccount
Regular Contributor

I actually just figured it out! It had something to do with some extra columns in my CSV that were being stubborn! I appreciate all the time and effort!

Vinzafy
Frequent Contributor

Ahh fantastic! Glad you figured it out and thanks for the update. Was it something to do with the column names that were giving you issues? Regardless, glad it's working now and that I was able to help in some way 😊

0 Kudos