Hello All,
I need to understand how it might be possible for my Survey123 feature class to be a related table to a polygon feature in the map.
In essence I have a farm field feature class and I want to perform an inspection against this. Conventionally, I would create a feature class to represent the farm in ArcMap and then create a related feature class in ArcGIS that is the inspection feature class. Now I could use this in collector. However, I want to take advantage of the field manipulation capability of Survey123.
The inspector already knows the farm ID so he just needs to perform the inspection with survey123. So the question is how do I publish the survey123 feature class and then relate it to the farm polygon feature class in ArcGIS Online?
Cheers
Gordon
Solved! Go to Solution.
I believe you can achieve that with Arcade. A caveat is Collector doesn't work well with Arcade at the moment.
Hi Aaron,
You could do this in the survey form- have the globalid come into a text file question and then use a substr() function to remove the curly braces
substr(${incoming}, 1, string-length(${incoming}) - 1)
Ahjung, thanks for the reply! I'd prefer not to go that route, if at all possible.
James, I'm not sure if I know what you mean by having the globalid come into a text file?
Sorry- that should be text question
@ Ishmael Chivite
Can you tell me a bit more about this added functionality for related tables in Survey123?
I have a workflow I would like to implement that involves the following criteria:
1). Edit, add, and delete features, AND related records from the same survey
2). Display the related records in the survey in tabular form
3). pulldata() from external, or just edit/update existing
Is this possible using Survey123?
Hi Max,
Thanks for getting back to me James. I believe that we actually spoke earlier this year during the holistic testing, but I am now trying to determine if Survey123 can accommodate the workflow as of the 2.0 release.
I have apartment building features, with a related table describing the rent, and sqft of each unit style/apartment type, within each apartment building. I’ll refer to this as the ‘unit mix’ data from now on.
The form will be used to collect and update the general apartment building details, as well as the unit mix data. It is my understanding that this could be done by either editing existing records (however not the parent features, and related table?) OR by loading the existing data as default values..(pulldata()?)
The most recent unit mix data needs to be presented as default values for reference and so that the can just be verified if there has not been a change. Similarly it would be best to display all of these rows in tabular form so that they can be visually compared.
Some of the apartment buildings have more than 50 different unit styles.
Can you describe which other apps you are referring to for displaying related records? Are you aware of any that allow a tabular display as well as add, delete, and update capabilities?
Thank you,
Max
This looks interesting. Each time I try this I receive a Code 1000 error message "The INSERT statement conflicted with the Foreign Key constraint....column 'GlobalID'. I had a geodatabase of wetlands and a related wetlands condition table, published as a feature service, followed the steps in this post, but keep receiving a Code 1000 error. Did the related table need to be layer 0? I have the related table named in the FormID.
Thanks,
Cinthia
Hi Cynthia,
It sounds as if you are attempting to duplicate a GlobalID on submittal. Is the GlobalID exposed in your form? Does this form just collect new records, or add & update existing records? Are you using this form along with Collector or another way to open Survey123 automatically?
Hi James,
I did fix the GlobalID issue. The form collects new records, and we are using it along with Collector. The issue now is orphan records are being created rather than the information going into the related table. From looking through this forum, seems as though others have encountered the orphan record issue as well. I will try some of those suggestions.
Thank you for the quick reply.