Select to view content in your preferred language

Can I have the same field name in Parent and Repeat child?

3131
12
03-06-2020 10:14 AM
DougBrowning
MVP Esteemed Contributor

In my forms I like to pass our PointID down to each repeat table for ease of viewing.   Since it is a separate repeat table using the same name should technically be ok.  But of course the excel form in Connect is yelling about it.

It seems like I can still publish but am I headed for disaster here?  I was going to change the repeat field to PointKey but I have a form with 3 repeats now so that would get weird.  PointKey1, PointKey2, etc.  It would be a mess when moving data to my backend SQL.

Then the other issue is if I have the repeat also use PointID with a calc of PointID from the parent it gives an error.  So I guess I need to use PlotKey no matter what?  But could I still use PlotKey in all 3 repeats?

Anyone try having a parent and child with the same field name?  Is there any official guidance on this?

Thanks a lot

12 Replies
MichaelTorbett
Occasional Contributor II

@MichaelMannion Thank you for this information. I just incorporated it into one of my surveys tied to an Enterprise Geodatabase that has related tables with the same field names. Have you ran into any issues with using the path names in your calculation fields? I'm having an issue where my fields aren't calculating if they are tied to a relevant question, but I think this might be a bug in the the latest 3.16 update.

0 Kudos
KayleeRivera
Esri Contributor

Replying here 2 years later with some additional tidbits that I just discovered after using this comment to solve an issue 🎉

Any groups or repeats that your target field is nested under also need to be named. So, for example, you could have:

/Form_4/my_group/Name
/Form_4/HYDRO.Asset/another_group/Name


We found that a quick way to access these XPaths without having to guess & check. With your survey open in Survey123 Connect, click the Files button on the left. Open the XML file in your text editor of choice. Ctrl + F to find the field name that you're looking for in the section with the bind tags. Copy the value from the nodeset parameter (no quotes). 

Thanks for the initial post @MichaelMannion!

MichaelMannion
New Contributor III

The short answer is "no", but the real answer is that I don't have enough first-hand experience to know the answer to your question. I've only learned enough about Survey123 to understand how it impacts our data model and infrastructure; we're fortunate to have a dedicated Survey123 team member building our production survey.

Hopefully someone with more practical Survey123 experience can comment. Sorry!

0 Kudos