I have a relational (5-level) ArcGIS online feature service that I would like to use Survey123 to populate some of the related tables used for inspection events. I cannot get the GlobalID to properly pass to the child GUID field in the survey to relate the created record to its parent.
Frustratingly, I can properly pass the GlobalID to GUID value if I code it as raw text in the constructed url (from copying the GlobalID from the messages console and using it in the pop up). This is befuddling, as the TypeOf function returns string for both the GUID and the Text(GUIID) variables. As well, the GlobalID will not pass to a text field, but encoding the pasted text value will. Could there be a problem with having two surveys pointing at the same feature service? I would not think so, but is could be.
I may have to go with loading a separate survey and passing the centroid of the feature to the survey. I'd rather have all the users view all the data through one survey dashboard. It is frustrating to be so close. Here is the Arcade from the popup (testing apparent) and the return.
var url_scheme = "arcgis-survey123://?itemID=6d69688d4473456a81f46ae892408422";
var this_unit_GlobalID = $feature.globalid;
var this_unit_GlobalID_txt = Text($feature.globalid);
var site_Name = "TestSiteName";
var unit_ID = "TestUnit";
var theDate = Timestamp()
var Planting_Unit_ME_ID = site_Name + "-" + unit_ID + "-" + theDate
var url = url_scheme + "&field:GUID_PlantingUnit_ME=" + $feature.globalid; //this_unit_GlobalID, this_unit_GlobalID_txt did not work either; "4bb95e5e-6a90-470f-804e-3507e24eccef" does work!
var url = url + "&field:Planting_Unit_ME_ID=" + Planting_Unit_ME_ID;
var url = url + "&field:Monitoring_Event_Note_PUME=" + "4bb95e5e-6a90-470f-804e-3507e24eccef";
arcgis-survey123://?itemID=6d69688d4473456a81f46ae892408422&field:GUID_PlantingUnit_ME=f65ec795-1ae5-47b7-bf05-a9c056306a8b&field:Planting_Unit_ME_ID=TestSiteName-TestUnit-2021-06-17T18:37:01-07:00&field:Monitoring_Event_Note_PUME=4bb95e5e-6a90-470f-804e-3507e24eccefUse Console Function to output messages. f65ec795-1ae5-47b7-bf05-a9c056306a8b String f65ec795-1ae5-47b7-bf05-a9c056306a8b String arcgis-survey123://?itemID=6d69688d4473456a81f46ae892408422&field:GUID_PlantingUnit_ME=f65ec795-1ae5-47b7-bf05-a9c056306a8b&field:Planting_Unit_ME_ID=TestSiteName-TestUnit-2021-06-17T18:37:01-07:00&field:Monitoring_Event_Note_PUME=4bb95e5e-6a90-470f-804e-3507e24eccef
Hi @DavidRichey ,
This may be better asked in https://community.esri.com/t5/arcgis-collector/ct-p/arcgis-collector
Can you confirm that you are using Collector Classic (i.e., version 19.0.2) as opposed to Collector (current version 21.0.1)? Collector classic doesn't support Arcade at all. There is also an issue with the Arcade interpreter used in ArcGIS Runtime that prevented the display of GlobalId; it appears that Collector is using a version of Runtime that is affected by that. You should see the value appear properly in Field Maps.