Global ID of relationship is in attribute instead of value filled in survey

273
3
04-15-2024 01:25 AM
AnnaHradecká
New Contributor III

I have survey123 created from existing feature layer. This feature layer has relation (1:n) with other feature layer. Primary key of connection is attribute "nazev".  

When I fill survey I can add anything to "nazev", but after I send it, in attribute table in feature layer is something looks like GlobalID {B5060B53-873A-4657-8B02-1392826CAFFC} in "nazev" field. This is also automatically fill to relation layer foreign key attribute. 

What can I do not to have GlobalID string in "nazev" attribute?  

3 Replies
DougBrowning
MVP Esteemed Contributor

123 uses globalid and stores it in the child in a field called parentglobalid.  It cannot work with your own custom relationship.  My guess is it is trying to use your relate by adding a globalid to your own field in the relationship class instead.  This is strange though as I have over 40 relationship classes and have never seen it try this.  What I do is have one relate that is the globalid to parentglobalid to make 123 happy then have a second relate that I calculate the keys in the form manually.  In your case I would add parentglobalid to the child and the relate then use a calculation in the form to populate your nazev field.

My post here on how I do this may help.

https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-... 

Hope that helps

0 Kudos
AnnaHradecká
New Contributor III

Thanks for your answer. But I'm new to Survey123 connect and also to relationship class, so I don't understand where I should add parentglobalid to the child and how I calculate "nazev" field in the form (I know I can use calculation in it, but I don't know how, when "nazev" field is changed to id)

I have more information about the layer and survey:

  • This is a view of the feature service with disabled editing: OMI_OK_Brno_ve_filmu_verejne_v - Overview (arcgis.com)
  • In Survey123 I work with the layer "Snimky" (Survey created from an existing layer)
  • "Snimky" layer is related to the "Sceny" layer (Relationship class was created in ArcGISPro, type: simple, cardinality 1:M, origin: Snimky, primery key: nazev, destination: Sceny, foreign key: film)
  • In attachment is the survey table, it does not have any parent, child or globalid fields, any repeats...
  • I don't want to add or update anything in the "Sceny" layer with this survey (I have it in different apps)
  • When I submit a new feature in the survey, "nazev" is changed to something that looks like globalid, but it is not the globalid of the feature or the globalid of its relationship to "Sceny", because it is every time different for new features in "Snimky" and it is same for each new feature in "Sceny" related to one feature "Snimky".  
0 Kudos
DougBrowning
MVP Esteemed Contributor

I suggest making a copy of the form and publish that right from 123.  Then download that as a GDB and you will see how it wants the structure.  

0 Kudos