Select to view content in your preferred language

Is it possible to use select_one and pulldata() together?

17410
40
Jump to solution
03-01-2017 10:56 AM
KaceyCummings
Emerging Contributor

I am pre-populating a survey using the pulldata() function and was hoping to use it in conjunction with choice lists (in the event that the native data needs to be updated). It looks like this is not a possibility. In fact, pre-populated fields with type = text will no longer populate when the select_one feature is added to a different field using the pulldata calc. 

Any suggestions/workarounds?

0 Kudos
40 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Pauline,

At this time there hasn't been any change in terms of support for this.

0 Kudos
AdamDaily
Frequent Contributor

I have a question regarding select_one and pulldata. I want to use survey123 to collect surveys tied to a point layer. At the same time I need to collect new points with new attributes as my point layer is not complete. The info I want to collect in the survey is time sensitive. If a new location is captured and a survey is submitted, I want that new location available in a select_one list to others using the same survey without having to add that info to an existing csv file or a survey pick list.

I know you can create a feature service from a related point & db table, or export a point file to csv to pulldata from, but the workflows I have seen depend on either having that database table and all the rules set up, or having a completed point feature class to draw from. I have a survey form created,and I have a incomplete point shape file. 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Adam,

Unfortunately, you're running up against a limitation of Survey213 currently.  We do want to support the workflow you describe in the future, with more dynamic sources of data than CSV files.

0 Kudos
AdamDaily
Frequent Contributor

James,

Thank you for the response. I don't necessarily need my data in a shape file but I would like it all in 1 place. I'm trying to find the best way to load existing data into my survey results layer to start, and then add to it using a survey. I also would like to stay in 1 application (not go out to collector) and even stay within 1 survey (same survey used to collect new geopoints and then to conduct surveys against those points). 

Can I create a survey from a hosted feature service (my point file) and would that pull the existing point file records into the survey results layer, or is it schema only? Is there a way to load existing shape file (or database) records into  the survey results layer?

Once I have everything in 1 layer, can I pull data into my survey fields using that same layer? For example, say I have points 123 & 456 that came over from my original point layer. Field worker 1 goes out and collects new geopoint 654 and field worker 2 collects new geopoint 321 using the survey. Now I want to conduct a survey against one of those same points. The next time I open the survey, is it possible to select from a pick list pulling from the survey results layer attriubte field that would now contain all 4 of those values?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Adam,

My apologies for being late in responding.  Yes, you can set up a survey based on what you describe.  You could either create the survey based on an existing feature service with the data you have, or create the survey and then load the data into it (the Append tool in ArcGIS Pro does this, for example).

For the second part, this could be done either through the Inbox functionality or by combining Survey123 with either Explorer or Collector as a viewing client to show the features as they come in.

0 Kudos
ElinFields
New Contributor

Related to this, I have a few questions. If an external select is used in a survey, a csv file containing those choices is saved in that survey's media folder (and I'm assuming is in AGOL when the survey is published). Is there a way to have multiple surveys reference that same CSV file in AGOL? Furthermore, would it be possible to 'update' that CSV file from AGOL (as with hosted feature layer CSV files, as long as the file name is the same)? 

I ask because the external choices I plan to use would be a constantly changing list based on another survey's responses. If those two things were possible, it would allow me to update the external choices on a daily basis without republishing all surveys.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Elin,

We are working on a sample python script to automate the uploading process so that the CSV file can be updated.  In the longer term, we want to support additional data sources like Feature Services that would be closer to meeting the central CSV resource that you describe.

RyanDeBruyn1
Regular Contributor

Coming in a bit late, however is there any information or update on this requirement / enhancement to be able to update the  choice lists in AGOL (.csv) option or other?  Or the sample you mentioned? Been scouring the wwws.

With the external choices (.csv option),  a python script could allow to scheduled a daily task to update the .csv based on results from the survey collected for new "other" choices that were not found in the current choice list and add them so that next day a user would see the option in dropdown.

As a user  if I don't find the value of the item i need to select, I want to  choose "other" and type in the text value of the "other_field".  I would like to see the other value I entered added to the choice list the next time (or at some period) the form is opened.

Regards,

-Ryan

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Ryan,

It sounds like what you are asking for can be done as a back-end workflow:

1) Get the values submitted in the 'other' question

2) Check for the values in the existing CSV file choice list

3) Add the values to the end of the choice list

4) Update the survey

0 Kudos
RyanDeBruyn1
Regular Contributor

Thanks,  late reply...

I agree it can be managed as back-end but I understand this would still require the manual update (publish) of the survey?  Can this be something that happens without human intervention?

-R

0 Kudos