Table to Domain fails to import records from Excel that have integers in the code column when the destination domain has a code datatype of short integer. This is the case even when the integers are within the range of short integers (-32,768 to 32,767).
We are working on migration to Utility Network. In doing so, we need to duplicate some of our existing domains in UN. However we need many of them to have data type "short" in UN - instead of data type "text" which they currently have. To do this we have tried the following:
Step 3 fails with Error 000307 The input field type does not match the field type of the existing domain.
In the attachment, you can see that after the tool failed, I verified that the codes were true numbers (see cell D2 in the Excel file). I had also previous tested manually entering one of the codes and its corresponding description into the new domain and that was successful.
I had submitted this as a bug (#02779308) and was informed that the error is due to the values in Excel being classifed as data type double, not short and that it would require a work-around involved multiple additional steps to get this to work.
Rather than have to use the work-around, this idea is that the Table to Domain tool gets enhanced so that it attempts to coerce input codes to the datatype of the domain code. With this enhancement, I would expect an input code of datatype double should successfully migrate to a domain code datatype of short integer, provided that the input codes are in the form of whole numbers that are within the range -32,768 to 32,767.
Hi @AngelaDeegan While you have a valid idea here, I thought I'd share the following in hopes of keeping you moving ahead in a somewhat straightforward and not too egregious way...
Once you have the Excel sheet in Pro, export it to csv and set the output datatype for the code as Short.
The csv now has the Short datatype for Code.
Then run Table to Domain using the csv table as input. Should work:
I found this post in hopes of locating a more streamlined way to get the correct output field type from the Domain to Table tool. This solution seems clunky and time consuming, by the time the process is finished one could have simply recreated the domain from scratch.
As of ArcPro 3.2.1, there is no option to choose field type in the Domain to Table tool. Is this on Esri's radar? Please??
I am having a similar issue. I have changed the Code column to Number in Excel, but when I add the table to ArcGIS Pro, it imports as a Long Field Type and the domain I am trying to update is Short. No number exceeds 4 digits (e.g. 1300).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.