Solved

How to retain ObjectID in GDB

  • 29 March 2021
  • 5 replies
  • 31 views

Badge +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

icon

Best answer by nielsgerrits 29 March 2021, 12:00

View original

5 replies

Userlevel 6
Badge +32

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

 

2021-03-29_12h03_54

Badge +1

Thanks, that did the trick :)

Userlevel 5
Badge +29

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

Userlevel 6
Badge +32

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.

Badge +1

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.

Reply