Select to view content in your preferred language

Survey123 Connect not generating GUID Field

1683
8
Jump to solution
10-25-2023 11:24 AM
RutledgeNicholas
Occasional Contributor

When I post a submit a survey123 form to a hosted table layer the GUID field is not populating. Why does it not populate? If I understand correctly, I need the GUID for a table I've related to this table. Attached is the XSLForm file.

In the table I published from ArcGIS Pro as Web Layer it has a GUID field in it as well.

0 Kudos
1 Solution

Accepted Solutions
ezirhli
Occasional Contributor

Hi Rutledge Nicholas,

The function is uuid() .  Note that if you want to create a GUID field (the default is text), you also need to set the bind::esri:fieldType column for it to esriFieldTypeGUID.

I am also attaching the solution link added for the problem.

Survey123 unique ID

ezirhli_0-1698303860283.png

 

View solution in original post

8 Replies
DougBrowning
MVP Esteemed Contributor

123 will only manage relationship classes it created using a repeat in the form.  It cannot figure out custom relationship classes so you need to manage them yourself.   At least I have never seen it.

I do this a lot by passing in the key from a URL via Field Maps or web map.  123 can generate GUIDs but they would be random.  I personally always use meaningful keys that come from the attributes.

I hope that makes sense.  Not sure what your workflow is.

 

ezirhli
Occasional Contributor

Hi Rutledge Nicholas,

The function is uuid() .  Note that if you want to create a GUID field (the default is text), you also need to set the bind::esri:fieldType column for it to esriFieldTypeGUID.

I am also attaching the solution link added for the problem.

Survey123 unique ID

ezirhli_0-1698303860283.png

 

RutledgeNicholas
Occasional Contributor

@ezirhli 

Appreciate this information. I tried looking for the solution you pointed me to. Never was able to locate it. I guess I was probably searching with a different terminology instead of something like "unique ID".

Thank you again!

DougBrowning
MVP Esteemed Contributor

Yes you can generate a uuid but it will not be correct when trying to use for related records unless you push them over to the parent yourself.

SenadHodzic1
Occasional Contributor

So if I am understanding this right, even if I publish my Feature Class with Global ID's enabled, I am unable to let the Global ID's from EGDB populate itself? I have to use the uuid() calculation? and if so, it's going to be random/non-unique?

0 Kudos
ezirhli
Occasional Contributor

@DougBrowning is telling the truth.
The global id of the spatial layer must match the guid field of the relational table. I think what you need to do according to your workflow is to have questions in survey123 that contain spatial data and also questions related to the relational table consisting of begin repeat and repeat fields.  Survey123 easily manages the globalid and guid relationship with repeat options.

@RutledgeNicholas 

0 Kudos
RutledgeNicholas
Occasional Contributor

@ezirhli & @DougBrowning 

Would it be possible to do a pull data function and pull the Global ID for the in the GUID (Parent Global ID) field of the child table? Do I understand it correctly that the GUID field in the child table needs to matched the Global ID field of the parent in order to match up the child table attributes of the child table with the parent table attributes?

0 Kudos
DougBrowning
MVP Esteemed Contributor

You can try to pull it or just use some other key that you can calculate.  Or push it in from a URL.  Fo me we have all the parents in Field Maps for navigation to the Plot.  Then I use a URL to pass that key to 123 which is the child.  That is how I manage them myself.  You could do this from a web map also.  Since you are skipping right to the child you need to get that parent key pushed over or calculate it in the form yourself.

My post here may help  https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-... 

But basically Arc are just "dumb" relates - all it does is go to the child table and select the records that match the parent key. So as long as those two sides match you are good.

Hope that helps