autocomplete search("name?url=https://services1.arcgis.com/1acZBnEF9zjV0l5X/arcgis/rest/services/Test/FeatureServer/0")
But how do I populate my Foreign Key within the Survey in the related table automatically based on the building selection?
Thanks
Solved! Go to Solution.
@IsmaelChiviteI accomplished this using a piece of javascript and this in the calculation field:
pulldata("@javascript","get_globalid.js", "findCode", 'https://services1.arcgis.com/1acZBnEF9zjV0l5X/arcgis/rest/services/Building_Data_Test3/FeatureServer/0', string(${NAME}), 'GlobalID')
Thanks for your suggestion!
Have you considered using the Inbox for this?
Through the Inbox, you will be able to display (and filter) all buildings as a list and also as a map. Selecting a building from the list or map will open the survey for that building. Adding a new row into the buildings inspection repeat will automatically add your inspection as a related record.
Thanks @IsmaelChivite for the quick response. I have never tried the Inbox before. I don't really want to have the user select the building spatially, just from a drop down. Do you have a link to any examples of how this can be done using an existing feature service and related tables?
@IsmaelChiviteI accomplished this using a piece of javascript and this in the calculation field:
pulldata("@javascript","get_globalid.js", "findCode", 'https://services1.arcgis.com/1acZBnEF9zjV0l5X/arcgis/rest/services/Building_Data_Test3/FeatureServer/0', string(${NAME}), 'GlobalID')
Thanks for your suggestion!