I'm trying to configure a empty asset points layer in ArcGIS Pro that I can collect on that, once a unique ID found on the asset is entered in the top form field, will pull and autofill all of the point layer fields from a corresponding row that exists in a related table based on that unique ID.
I know I can do a simple spatial join on the unique ID field once I collect all or a subset of the asset points, but there's a project constraint that necessitates the data being joined simultaneously while the asset is collected.
Solved! Go to Solution.
Hi @jmcdonald_sdi . Sorry for the delay. I did some testing and was able to get it to work. Here is the expression I used, you will need to update with your data. Please let me know if you have any questions.
//get facility ID value
var facilityID = $feature.Facility_ID__Mix_
//Use FeatureSetByName to find related table, this will show $map, "FeatureName - TableName"
var relatedRecords = FeatureSetByName($map, "FeatureName - TableName")
//Filter by unique facility ID
var facilityIDrecords = Filter(relatedRecords, "Facility_ID__Mix_ = @facilityID")
//Use first record found in filter
var FirstRecord = First(facilityIDrecords)
//return the first record attribute, add your field name after the .
return FirstRecord.YourFieldName
Hi @jmcdonald_sdi ! Can you tell me more about your workflow? I'm assuming that your point layer is completely blank and doesn't contain points, can you confirm?
Yes, point layer is completely blank. I want to collect location points and photos to "enrich" a non-spatial table of assets that were collected recently.
My intended workflow is to have the field crews enter a physical ID from the asset as the first field of a form, this action would trigger a check of the related table using that unique ID. If the ID entered matches one found on the related table, it automatically fills in the rest of the form with the corresponding data from that specific row on the related table. From there, the crew can confirm all those attributes on the form and save the new asset point.
I put the point layer and the asset data table in a fresh geodatabase and created a one-to-one relationship class on the field that contains the physical ID found on the asset. I then published the point layer to AGOL to try to see if the table would show up in the related records tab in Field Maps designer.
The table shows up in field maps designer with the layer but I can't configure the point layer to pull data from the table. I can see the point layer as a related record for the asset table but I don't see the table as a related record on the point layer. Maybe this has to with the point layer being blank.
Any input or advice would be greatly appreciated.
Here's my Arcade expression that should work but doesn't:
Hi @jmcdonald_sdi . Sorry for the delay. I did some testing and was able to get it to work. Here is the expression I used, you will need to update with your data. Please let me know if you have any questions.
//get facility ID value
var facilityID = $feature.Facility_ID__Mix_
//Use FeatureSetByName to find related table, this will show $map, "FeatureName - TableName"
var relatedRecords = FeatureSetByName($map, "FeatureName - TableName")
//Filter by unique facility ID
var facilityIDrecords = Filter(relatedRecords, "Facility_ID__Mix_ = @facilityID")
//Use first record found in filter
var FirstRecord = First(facilityIDrecords)
//return the first record attribute, add your field name after the .
return FirstRecord.YourFieldName
Hey Kari,
This code worked perfectly with your changes:
Thanks so much,
Jack