Data-driven Domains

525
2
06-10-2020 06:38 PM
Status: Open
Labels (1)
RandalGreene
New Contributor III

In a geodatabase with tables configured using classic 1-M relationships, it would be convenient to have data entry in a "child" table use a drop-down list of values from its "parent" table. For example, when creating an Invoice, have the Customer drop-down list populated from the latest values of the Customer table. This is such a common pattern in relational database systems, that I was surprised to find Esri cannot populate coded-value domains using a regular geodatabase table. I've searched high and low and opened a support incident to find a workaround, but none appears to exist (I'd be happy to learn otherwise). To be manageable, this needs to take effect at the database level so that the latest values are available whether the parent table (Customers in the example above) is edited in Pro, in Map Viewer, via a GP tool, etc. And the logical construct seems to be a coded-value domain where the values are not hard-coded, but come from a geodatabase table or feature class attribute table. Thanks.

2 Comments
KoryKramer

What is being used as the primary key and foreign key - a different field than what you're trying to populate as the Customer?  I'm wondering if the FeatureSetByRelationshipName could be leveraged to automatically populate the Customer field in the child table by pulling from the Customer field in the parent table Data Functions | ArcGIS for Developers 

That is not the same as creating a dynamic or data-driven domain dropdown which is what is requested by your idea, but I was mainly wondering if you've already tried this to meet the business need.

RandalGreene3

Thanks for the suggestion Kory. I have only used Arcade in a couple of situations (dynamic map layout text and attribute rules), so took this opportunity to learn some more about the use profiles (https://developers.arcgis.com/arcade/guide/profiles/).

In the simple example for our case, we have a Customer table with OBJECTID (primary key) and Name, and an Invoice table which includes CustomerOBJECTID. When editing an invoice, we want a drop-down list of Customer Names that then saves the corresponding CustomerOBJECTID. We do have a relationship class between the tables, but I what can't see anywhere in the Arcade use profiles and examples is how to make it populate a domain (or fill a drop-down list) in the default editors.