Select to view content in your preferred language

Prepopulate field from related table

334
1
01-02-2025 02:27 AM
mdg
by
Emerging Contributor

I have set up a 1-to-many relationship class between a feature class (Building Permit Application Point) and its related table (Customer Information), and published it to ArcGIS Enterprise 11.3.

The user is required to create a new inspection record using a Survey123 form.

When the user selects an existing BPA point using Field Maps or Map Viewer, the Inspection form will be opened and I want the new inspection record to automatically populate with certain attribute values (Application No, Project Name) from the related table of the selected BPA point.

In the BPA point popup, I used the URL format: arcgis-survey123://?itemID=Survey123FormID&field:application_no={relationships/2/application_no}&field:project_name={relationships/2/project_name}, but it's not functioning as expected.

Has anyone encountered a similar issue? If so, I would appreciate any advice or suggestions on how to resolve this. Thank you!

1 Reply
DougBrowning
MVP Esteemed Contributor

Yes the {relationships/2/application_no} syntax does not work in the URL in Field Maps.  It works in the browser but not Field Maps.  It did not work in old map viewer either and I have been bugging the Field Maps team about this for close to 10 years I think!  I even talked to Jeff directly about it.

I posted it again here https://community.esri.com/t5/arcgis-field-maps-questions/relationships-0-fieldname-not-working-in-f... some time back and got no response.  Drives me nuts it does not work and is not documented anywhere.  Please chime in on that post and maybe move this post to the Field Maps page since its not a 123 issue.

Instead you have to make your own Arcade expressions to do the lookups and then use that in the URL.

Like this

var tbl = FeatureSetByRelationshipName($feature, "Points", ['DesignLat'], false);
return First(tbl).DesignLat

then the URL you use &field:DesignLat={expression/expr0}

I have to make over 30 of these in my project because the relationships thing won't work.  

Hope that helps