When clicking the blue add button to add a related record/inspection, it brings the globalid/guid value forward into the related table, but what if I want the feature class park name value to populated the related table as well in the park_name field?
Solved! Go to Solution.
I wonder if you cannot use by relationship name because the New Map viewer has no relationship class support? Also wonder how poster is using this when the map has no relationships.
thanks
Field Maps uses the relationships defined in the feature service. As long as the parent and child layers are in the map and there is an actual relationship between them, this should just work. There are some existing issues with the Arcade implementation where this doesn't work with offline areas or where the casing of field values matters.
If someone has a sample map where the FeatureSetByRelationshipName isn't working, can you please DM me about it? I'm happy to look into and log an issue if necessary.
Just as a follow-up, we've identified two issues related to FeatureSetByRelationshipName.
1. If your relationship contains a "." in it, then the Android and iOS apps fail to successfully execute the expression. This also occurs in Pop-ups. This is under investigation but probably won't make the next release.
2. In the Arcade editor, if the related layer/table does not have any features it, when you attempt to test it or save an expression that used FeatureSetByRelationshipName the editor fails to execute the expression with "Execution Error:Cannot read properties of undefined (reading 'toString')". The reason it fails is due to how the Arcade Editor evaluates the expression when the foreign key field value is null. When Field Maps or Map Viewer launch the Arcade editor, they need to provide a sample feature to represent $feature. It will query to find the first feature in the layer/table and use that. If there are no features, it generates a sample feature using the default values of the field. In this specific case, if your related table has no features in it, this sample feature will likely have a null value for it's foreign key field. A simple workaround is in the Arcade Editor edit $feature using the > icon and then the pencil/edit icon and add any value to the foreign key field (it doesn't matter what). Then you should be able to test and save it. This is not planned to be fixed in the next release.
Thank you Aaron, I simply replaced the FeatureSetByRelationshipName (because it did contain "." to FeatureSetByName
Is there an update on a fix for the first problem? Since we use referenced geodatabase classes, I think it's basically always going to have a "." in it right? It would be great to see this issue addressed!