Store additional information in coded value domains

253
4
05-04-2022 07:25 PM
Status: Open
Labels (1)
Bud
by
Frequent Contributor

It would be handy if we could store additional information/columns in GDB domains. So that we could use that additional data in SQL queries, reports, labels etc.

  • CODE [domain coded value]
  • NAME [domain description]
  • Additional field: DETAILS

 

Tags (2)
4 Comments
KoryKramer
Status changed to: Needs Clarification

Thanks for submitting the idea @Bud We're going to need some additional details to understand what you're looking for here. Can you describe the problem you're trying to solve along with any examples you might have? 

Thanks

KoryKramer

Thank you for providing additional details, Bud.


So that we could use that additional data in SQL queries, reports, labels etc.
  • CODE [domain coded value]
  • NAME [domain description]
  • Additional field: DETAILS

So for your additional queries, reports, labels, etc. you want to run those directly against a domain table? 




 

Bud
by

@KoryKramer 

Yes. 

In Oracle, we can select the domain data from the XML system tables as follows:

select
    substr(extractvalue(codedvalues.column_value,'CodedValue/Code'),1,255) as code,
    substr(extractvalue(codedvalues.column_value,'CodedValue/Name'),1,255) as description
from
    sde.gdb_items_vw i 
join 
    sde.gdb_itemtypes it 
    on i.type = it.uuid, table(xmlsequence(xmltype(definition).extract('/GPCodedValueDomain2/CodedValues/CodedValue'))) codedvalues 
where
    i.name = 'PIPE_MATERIALS'

So we can already use the domain data in queries, reports, labels etc.

But what we can't do is store additional information/columns in the domain. 

KoryKramer
Status changed to: Open

Thanks for the clarification, Bud. Re-opening the idea.