Skip to main content
Solved

How to retain ObjectID in GDB


Forum|alt.badge.img+1

Hello. I am trying to make a transformation in the values of a certain field called Labeltxt in a feature type in a gdb. I change the value in the field. This succeeds, but when I need to write back into the gdb i have a problem:

 

Either i use "drop and create" in the writer, but then the objectID field is re-written, which we use to relate to other tables.

 

Or i use the "update" "use existing", and then select "labeltxt", but then the field is not changed in the gdb that is written.

 

Is there a way that I can retain the Object ID and also change the labeltxt value?

 

Regards Rasmus

Best answer by nielsgerrits

You need Update and Use Existing, and select ObjectID in Row Selection Columns.

 

2021-03-29_12h03_54

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • March 29, 2021

You need Update and Use Existing, and select ObjectID in Row Selection Columns.

 

2021-03-29_12h03_54


Forum|alt.badge.img+1
  • Author
  • March 29, 2021

Thanks, that did the trick :)


hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • March 29, 2021

While @nielsgerrits​  answer is correct, I would strongly recommend against using an ObjectID as a "unique identifier" as ObjectIDs change change. If the data is copied or moved between databases, the object ID might change. I'd reccomend have a seperate GUID type field setup that you can use for any relationships that may be required


nielsgerrits
VIP
Forum|alt.badge.img+54
hkingsbury wrote:

While @nielsgerrits​  answer is correct, I would strongly recommend against using an ObjectID as a "unique identifier" as ObjectIDs change change. If the data is copied or moved between databases, the object ID might change. I'd reccomend have a seperate GUID type field setup that you can use for any relationships that may be required

I second this. I was assuming he had no other id field available.


Forum|alt.badge.img+1
  • Author
  • March 30, 2021

Thanks for the advice. Yes, we realise that this was a mistake. But we have a massive database built on this system, so it is too late to change now unfortunately.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings