1:M relate in Feature Layer, want to create Survey123 using the existing table - How to Setup?

268
4
05-04-2020 12:00 AM
BenVan_Kesteren1
Regular Contributor

I have a cemetery project where I have two tables, one is a polygon feature class representing grave locations, and the other is a basic table, with occupant information. There can be Many people, within a single grave, so it is 1:M (grave to burial).

The raw data in my Enterprise GDB has a relate setup on the above, and has been published to AGOL, and it looks good online.

A view of the original data from the GDB - Imgur 

I can select a grave online, and it shows the MANY rows within that one grave:

Now what I am hoping to do is create a survey based on this feature layer, and I imagine that it will have a few base questions based on the grave polygon, and then a repeat, showing each of the people buried within, with the capability to add extra people to those graves, using the repeat.

I thought if I used Survey123 Connect to create a new survey, based on an existing feature, that it would automatically setup the repeat based on the related table, but as you can see in the attachment, it doesn't do that at all.

Every row in the above automatically created spreadsheet is from the original cemetery_graves table, it has no reference to the related burials table in the survey at all.

Can someone tell me if they have been able to create a survey based on existing tables with a related table? Is what I am looking to do even possible?

I have been able to create surveys with repeats, from scratch, but this is the first time I have existing data, that I want to incorporate in my survey.

Ismael Chivite‌ I am wondering if this is something you have dealt with or come across in the past? A survey on a feature class, that has a related table...

Cheers

0 Kudos
4 Replies
josevaldes1
New Contributor III

hi,

i work a survey with an existing feature and add some new related tables after the survey was created. you need to create the repeat and in the name of the repeat put the name of the table. also need to use global ids.  if you relation is based in gis_authority_link i think you need to add the global id in both feature and related table. then a parentglobalid in the table. create the relation based on this fields and with programing pass the feature globalid to his corresponding parent globalid .  

the best way to see, is create a new survey with a repeat and download as fgdb and see the structure.

my data is also in enterprise DB-Sql

0 Kudos
BenVan_Kesteren1
Regular Contributor

How do you create the parentglobalID in the related table? Do you just create a string field? I thought when we create a GUID field type it was auto populated. In my case I need to tell these thousands of rows what their parent ID should be equal to. Have you done this before? I have only ever auto-generated the GUID.

0 Kudos
josevaldes1
New Contributor III

hi, the parentglobalid is Guid type in the related table. this is a example of one of my related tables.

when you add the globalid normaly is generated automatic but you need to fill the parentglobalid. Remember create a new relation with the parentglobalid. 

To fill the parentglobalid :

1) you can create a python script to fill it.

2) Maybe in arcmap create a join with your actual key relation and do a calculate field to fill the parentglobalid with the globalid of the master record.  

create a copy of your data ( filegeodatabase) and do some  testing. 

in my case my feature was empty.

0 Kudos
DougBrowning
MVP Frequent Contributor

You can use any key you want not just GUID.  I would have 1 form per person all linked based on the ID.  Plots go into Collector then you launch forms from it.  A relationship class ties it all together.

See this post here for more on this type of workflow.

Mapping with Survey123 within a polygon or admin unit 

Hope that helps.

0 Kudos