Select to view content in your preferred language

Python script or toolbox tool for end user to add entry to Enterprise GDB Domain

1780
4
Jump to solution
01-16-2017 03:10 PM
BenVan_Kesteren1
Deactivated User

Hey All, 

I have an Enterprise GDB that has a feature class of our Road network (polylines).

One of the fields within this Feature Class is 'Road Name', this has a domain applied to it so as end users cannot misspell road names when entering them.

The bottleneck with this setup is that each time a new road is constructed in our Local Government Area the end users has to email me the road name, then I manually enter it into the domain myself. This can be a delay for the end user and is not ideal. 

My ideal scenario would be a toolbox tool that I can create so the end user can open it, and simply enter a road name and click run, and the road name will be added to the domain for them to use. 

I have no idea how to even start something like this, has anyone else got a similar setup with a solution I could apply?

Cheers

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RebeccaStrauch__GISP
MVP Emeritus

I would recommend allowing the user to create a .txt or .csv file and then using Table To Domain—Help | ArcGIS Desktop   With the append option.

I would also recommend resorting the value every once in a while, if many items have been added (or each time).  Should speed things up.  I can't remember if this us a standard tool for the sort, or something from GitHub (not at office to check what I use).

Sort Coded Value Domain—Help | ArcGIS Desktop 

View solution in original post

4 Replies
DanPatterson_Retired
MVP Emeritus

if there is a tool available in Arctoolbox An overview of the Domains toolset—Help | ArcGIS Desktop 

or a category in arcpy ... Domain—Help | ArcGIS Desktop 

but sometimes, if you can't access an arctoolbox tool or classes and functions in arcpy then you have to go the arcobjects route.

So... what is your actual workflow?  How do you do it manually?

BenVan_Kesteren1
Deactivated User

Currently I right click on my DB connection as administrator, click the domains tab and type it into the grid in that window. 

We do not allow end users to have the admin password, so the end user cannot do this themselves, so I am trying to get around this by creating something they can use.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

I would recommend allowing the user to create a .txt or .csv file and then using Table To Domain—Help | ArcGIS Desktop   With the append option.

I would also recommend resorting the value every once in a while, if many items have been added (or each time).  Should speed things up.  I can't remember if this us a standard tool for the sort, or something from GitHub (not at office to check what I use).

Sort Coded Value Domain—Help | ArcGIS Desktop 

MicahBabinski
Frequent Contributor

It seems that the Add Coded Value to Domain GP tool would get you there. The tricky part is that if the end user is to run the process they will need to execute it on the administrator database connection. If you are ok with the end user adding these values with you validating them first, you could have the process run on a database connection in a hidden folder, or create a database connection with the necessary privileges, update the domain, and then delete the connection.

If you wanted to validate the values first or don't want the end users to make the change directly in the workspace, Rebecca's idea may help streamline that as well. You could set up a tool to allow the user to populate a table with the new code/code description values, then have a nightly (or on-demand) process that would add all the values to the domain run in your administrative environment and then truncate the table.

Micah