Survey123 project with existing data, base on existing features or related tables?

1221
9
02-13-2020 03:29 AM
Sean_S
by
New Contributor II

Hi, I am currently working on a Survey123 project for surveying known addresses.  I will be using an Enterprise Portal and build the survey in Survey123 Connect.  The survey will have pictures as attachments.

We want to be able to create detailed survey at each address, and show the progress of the survey in a webmap, as they are completed.. status for example.

I have an point address feature with address information and a addressID. (14k points)

I have successfully created a CSV and used the select_one_external functionality to build a drop down for address selection.

I am looking for suggestions on what is the best solution.

  • Base it off the existing feature? (the survey is fairly complex)  I did test this but unless I am misunderstanding it was a bit complex... I created it from the feature service, and copied the older survey into the xls form, but then the upon publishing, I get the error that Fields not Found in feature service.. ( for a smaller test, I added all the fields by name and type with python and then republished, but this seems overly complex, and a big headache if I want to make a change)  Also, the Inbox technique was not really what I was looking for.
  • Relate the survey to the point feature?  (tried this but it created a geo point in the survey, which can be inaccurate and useless, I want to use the locations of the address points I have)
    • I think this may be the best way forward:
    • I understand if my survey has a submission URL to the point feature service it will not create the a point feature itself, but use the one referenced here?
    • How can I, in the survey, choose a survey by address at this point?
  • Publish a final version as is, and ignore the location data in the survey but relate or join it by address or addressID to the feature class ( or feature service based on the feature class), ie symbolize the feature service with information in the survey via a relate or join.   ( I think there is a better way, ie one of the ways mentioned above)

I have looked at various posts and blogs about these topics, going back several versions and to 2016...

I feel I have been going in circles and chasing my proverbial tail...

Any help, guidance or suggestions are most welcome.

Ismael Chivite‌, James TedrickEdmund Hall

Thanks in advance,

Sean

0 Kudos
9 Replies
EdmundHall
New Contributor III

Hi Sean Stonerock‌,

I think using the Inbox of the survey form will probably be the easiest approach. A suggestion as to how this could be achieved is to publish your survey form with the fields you require including 'hidden' questions for the attributes of your address feature class and then load all of the address points into the feature layer created as part of the publishing process using the Python API or ArcGIS Pro.

This should then populate the Inbox of your survey. There's a limit of 1000 records which will be displayed in the inbox; you can work around this by including a geopoint question within your survey which will enable the map option of the bottom of the inbox. By zooming to a particular area in the inbox map and hitting refresh, surveys only within the bounding box will be loaded, and should allow you to find a particular survey. If the geopoint question is set to "read only=yes" within the XLSForm, then the pre-determined location from loading in your address list will display within the survey, but won't be editable.

It's probably also a good idea to set up some sort of inbox query expression so completed surveys are excluded, and change the settings of the feature layer so that the creation of new features is disabled, ensuring that users can only search for and edit the details of existing surveys/addresses.

A submission URL tells a survey to point to a different feature layer - the inbox functionality should still operate the same as the feature layer created when publishing a survey.

Hopefully that makes sense? If not, I'm happy to elaborate further.

If this has been helpful or answered you question, please mark the response to help other GeoNet users!

Sean_S
by
New Contributor II

Edmund,

First off, thank you for your quick reply.

Everything you have said makes sense, and it has been informative.  I will tweak the survey and then follow your guidelines and let you know how it goes.  I will probably have a question or two. 

0 Kudos
Sean_S
by
New Contributor II

Ok, so it has been a bit more complicated than expected.

Some issues with this:   

The Survey when published, published as a point with z enabled.

It was published to GCS WGS 1984.

Using an insert cursor, something I am used to when working in arcpy.da was not possible.

I used a search cursor to access the point rows of my feature class though and was able to add one using 

ap_dict = {"attributes":
                  {"adresseid": row[1],
                     "adresse": row[2]},
                  "geometry": {"x": row[0].centroid.X, "y": row[0].centroid.Y, "z": 0}}

add_result = alpha3.edit_features(adds = [ap_dict])

(the above cursor was a short one for testing... but I am thinking I could have added my GlobalID from the point feature?)

I am thinking there must be an easier way, eh?   I was planning to 'Append' but it seems that is only available in ArcGIS Online.

How can I set the reference system to something projected and local (same as my address point feature for example)?

The Z issue I can deal with, but I find it odd as I saw it stated somewhere that z enabled point features were not allowed? (or only on Windows mobile apps?)( I could be wrong)

Thanks,

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Sean,

When initially authoring the form, you can specify the coordinate system of the feature service by using wkid=<WKID_VALUE> in the bind::esri:parameters column.  It sounds like you selected an EsriPointZ as the field type; leaving this blank will default to a 2-D point.

Sean_S
by
New Contributor II

James,

Thank you for the quick reply.  Do I add this, for example, wkid=25832 to the bind::esri:parameters column of the geopoint?

When I try this, it fails to publish saying:

Any suggestions are appreciated.  

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Sean,

Yes, you have the location to place the wkid correct.  I was able to publish a sample form with the WKID (UTM32N).  Does your form have more than 1 geopoint/geotrace/geoshape question?  This should be applied to all such questions.

0 Kudos
Sean_S
by
New Contributor II

It does not have any other geometry. (that I am aware of)

Thanks for trying it, but it is still giving me trouble, so the problem must lie elsewhere and I would love to figure out what it is.

I tried a new empty survey starting from Advanced template and added just a geopoint and set the wkid, it failed as before.

I did the same with a basic survey template, it failed as well.

I then created an new and empty feature service from my point layer in 32N.  When I created the survey from the feature service, I was then able to publish it in 32N.

The problem or headache with this kind of brings me back to my original question and problem... 

The work flow would be to:

  • Create the survey from the FS. 
  • Add all the rest of the survey in Survey123 Connect.
  • I can't publish it now as it does not match the original FS table.
  • So now I need to add all of the attributes in survey (python), by exact name and type to the original feature service, or original feature class, and republish.
  • Then create a new survey based on the new FS, and tweak it with the grouping and such.

It's a lot of work for getting it where I want to be.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Sean,

The wkid is set with a geopoint/geotrace/geoshape field, as you show in the screenshot (these are what I referred to when I said 'geometry').  Just to check, are you publishing to ArcGIS Online or ArcGIS Enterprise?

0 Kudos
Sean_S
by
New Contributor II

Yes, I am publishing to our Enterprise.

I have just pressed on in wgs84... I would love to get to the bottom of this, but we are squeezed on time.

0 Kudos