I have a service in ArcGIS Enterprise with the following structure, where each table is using a 1:M relationship based on GlobalID/parentglobalid.
Users will enter data into Tables 1-3 using Field Maps, however, Field Maps doesn't support going to a sub-table from a table, so Sub-tables 1 and 2 are filled out using Survey123. The forms submit to the service via a submission url.
The problem is that Survey123 only appears to support relating to a single parent, rather than a variable one. The result is that when I submit a Survey123 form, it assigns the parent record to whatever table it requires be in the form_id field, rather than from any of the 4 or 5 possible parents. It requires that the form_id be the table/layer that has the first relationship ID. So Table1 is related to Sub-table 1 with a relationship ID of 1 and that will be the required name in the form_id.
I set up the Survey123 form to pull the GlobalID from the correct parent and place that in the parentglobalid field, but upon submission, that value is overwritten. So, for the time being, the correct parent GlobalID is being stored separately then a notebook will run on a schedule to copy that value into the parentglobalid field used by the relationship. This isn't ideal as there will be an interval where the relationship is incorrect and if the user is offline in the field, it won't be corrected until they are back in the office.
The client would prefer not to use webhooks and a webhook won't work if the user is offline anyway.
While I fear the answer is no, has anyone figured out a way to establish a variable relationship like this with Survey123?
The trick is to use a second set of relates you mange yourself. I have a write up here https://community.esri.com/thread/221263-mapping-with-survey123-within-a-polygon-or-admin-unit
Basically download the form GDB then add you own relates, then publish, then repoint the form. Been working great for me for years.
In the end globalid is not a great choice since its hard to fix and if you download, copy to sde, etc you get all messed up. I let 123 do its thing and then have a second set for me. Having both can be handy.
The other thing you can try it point 123 at the service and let it build 1 big form. That will give you an idea on what it sees. What some do is have a form with all the relates then just hide the repeats they do not want to use. If it cannot build the form for you at all then its prob not going to fly. Layer 4 may give you trouble on this. You can also do this idea but with multiple forms possibly.
Hope that helps