Sorting and distinct values using search function in Survey123

2506
9
Jump to solution
08-05-2021 06:55 AM
vijaybadugu
Occasional Contributor II

I need to Sort and get Unique values using CSV or Feature service with search function. Could you please tell us what to do ?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi @vijaybadugu,

You can find the documentation about Linked Content here: https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformessentials.htm#ESRI_SECTION1_34A4D....

You can link a CSV from AGO/Enterprise, and the app will download the CSV to the media folder, to use just like any other CSV you put in media folder. This will work offline as normal. When the CSV gets updated online in AGO/Enterprise, the next time the user goes into the survey (on the info page) the CSV will be automatically downloaded and updated in the media folder.

Regards,

Phil.

 

View solution in original post

0 Kudos
9 Replies
by Anonymous User
Not applicable

Hi @vijaybadugu,

Could you please provide more details and usage of the search() function, areyou using in 3.12 release or 3.13 beta? Currently search() is only a beta feature.

Also can you provide your xslx file and media files (csv) and details on what you are trying to achieve?

Regards,

Phil.

0 Kudos
vijaybadugu
Occasional Contributor II

I was using 3.12 . 

0 Kudos
vijaybadugu
Occasional Contributor II

I uploaded the Media File. I included feature service access using search() function .  i have a requirement that, if the device is offline , it automatically pulls the data from local media csv file . if the device is online, it pulls the data from actual service data. few people suggested that, use "Linked content with CSV" and update the CSV content regular periods . How this works and is it possible to update local copy of csv file using Python API ? Will fieldworker get any notification that, your Linked content CSV updated please try to download latest copy of it? I did not find much documentation on it. 

0 Kudos
vijaybadugu
Occasional Contributor II

When I try to access from CSV file, I Could not able to get Unique values  for this I have to create separate column with Unique values. there is no specific function sorting in search() function to sort the list. 

0 Kudos
by Anonymous User
Not applicable

Hi @vijaybadugu,

You can find the documentation about Linked Content here: https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformessentials.htm#ESRI_SECTION1_34A4D....

You can link a CSV from AGO/Enterprise, and the app will download the CSV to the media folder, to use just like any other CSV you put in media folder. This will work offline as normal. When the CSV gets updated online in AGO/Enterprise, the next time the user goes into the survey (on the info page) the CSV will be automatically downloaded and updated in the media folder.

Regards,

Phil.

 

0 Kudos
vijaybadugu
Occasional Contributor II

Thanks for your clarification . How to update csv content in Arcgis online / enterprise using python with windows scheduler ?

0 Kudos
vijaybadugu
Occasional Contributor II

Thanks for info. I am able to update the content in ArcGIS enterprise with ArcGIS API for Python. My Last Question is , I think you have seen the CSV with Duplicate IDS in it. How to Get Unique , sort items to load in to dropdown using search() ?

0 Kudos
by Anonymous User
Not applicable

Hi @vijaybadugu,

The search function() and also pulldata() are designed to only return one unique value, the first value they find, therefore the list order and unique values need to exist in your datasource so that the CSV reflects this.

Regards,

Phil.

0 Kudos
vijaybadugu
Occasional Contributor II

Thanks