Pulling back data values from locally saved / submitted form data

581
2
Jump to solution
11-16-2020 09:14 AM
ChrisMaclaurin
New Contributor III

Hi All,

I am recording survey data under a predominent 'waypoint' number at each location. When finished at each location 'waypoint' the form is submitted (or stored locally, until a connection is available), so to get a as 'real time' as possible plot of waypoints from a map on the collector App.

I would like a field on the S123 form to return a 'last waypoint recorded' value that was previously used (and submitted), by that particular user. As far as I can tell this would have to imported from the 'locally' saved (on the mobile) device. Is this actually possible? 

Any pointers would be helpful. Thanks.

I see that it may is possble to pulldata from the feature layer (service)? this involves javascript by the looks of things... this is way beyond me (looking at a few complex examples like extracting data at a certain geopoint... ) is there a simple example somewhere I can learn how to extract a single value such as in my case?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi Chris,

It is not currently possible to query an existing survey record on the device in the database to get a value for a previously submitted survey. Only values is the same survey you are editing can be used in calculations.

As you pointed out, the only way to currently do this in the 3.11 released version of survey123 field app is using a JavaScript function, where you can write a function to query the feature service and return a value from the submitted data stored in the feature layer. You will need to know how to write JavaScript functions to do this, or at least try and find an example of how someone else has done this.

Alternatively, in the current 3.12 beta release available on the Early Adopter Community, there are now new ways to link a select one (choice list) to a feature layer table or CSV file in your hosted organization. You can also use the search() function to search and query a feature layer. Please see the documentation here and here to test out the latest 3.12 beta builds for these new features.

View solution in original post

0 Kudos
2 Replies
by Anonymous User
Not applicable

Hi Chris,

It is not currently possible to query an existing survey record on the device in the database to get a value for a previously submitted survey. Only values is the same survey you are editing can be used in calculations.

As you pointed out, the only way to currently do this in the 3.11 released version of survey123 field app is using a JavaScript function, where you can write a function to query the feature service and return a value from the submitted data stored in the feature layer. You will need to know how to write JavaScript functions to do this, or at least try and find an example of how someone else has done this.

Alternatively, in the current 3.12 beta release available on the Early Adopter Community, there are now new ways to link a select one (choice list) to a feature layer table or CSV file in your hosted organization. You can also use the search() function to search and query a feature layer. Please see the documentation here and here to test out the latest 3.12 beta builds for these new features.

0 Kudos
ChrisMaclaurin
New Contributor III

Thank you Philip-Wilson. I will try the latter as JavaScript examples appear to be quite specific and too precise to chop and change for my purposes (especially as I have little to no understanding of JavaScript), though I shell keep my eye out. The examples in  https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js-f...  and the JavaScrpt samples trough S123 connect are still too complex for me at the moment to understand. If you know of any other resources that would be really helpful.