Hi James,
Thanks for all of your replies - they've been really helpful. I still had some problems with the curly braces so I thought I might post how I got around them. I'm not sure if it's a wider problem or just me, but just in case it helps someone.
My scenario is very similar to the ones previously mentioned - I have a feature layer of visit areas related to a separate table of inspections. The visit areas are recorded using Collector (or through a web map app when being accessed on a desktop) and the inspections using Survey123 (or Survey123 for ArcGIS on a desktop) the two being linked, as above, with the custom URL passing the GlobalId from the feature layer to the a ParentGlobalId GUID field of the inspection table.
Everything worked fine between Collector/the web map app and Survey123, there were no curly braces being passed across with the GlobalId and the relationship between the two record types was being formed as hoped.
The problems only started happening once the user downloaded the map in Collector so they could work offline (rather than running live off the network). When this happened Collector started putting in the braces, which, as mentioned previously, prevents the link between records being established.
For my workflow I needed users to be able to add records using Collector when connected to the internet, using Collector when there was no connection and on a desktop. If I used the above suggested work-around of removing the first and last character of the incoming GlobalId, it solves the problem for the offline Collector route - it removes the { and }. However for the other two routes - which don't have braces in the GlobalId - it cuts of the first and last digits of the actual GlobalId. So not really ideal.
To get around it I took the ‘substr(${incoming}, 1, string-length(${incoming}) - 1)’ function and added an ‘if’ statement according to the length of the GlobalId value (which should be 36 characters in length, but is 38 when the braces are present), getting the following:
if(string-length(${incoming})>36,substr(${incoming}, 1, string-length(${incoming}) - 1),${incoming})
Using this calculation in another field on my Survey123 form and passing the results to the ParentGlobalId field in the inspections table seems to have done the trick.