1

Is it possible to create a field in Data Extension in ET/SFMC which is auto-incremented as the values are added to it?

  • ET means exact target tool where we create data extensions. – Madan Jan 19 '16 at 12:56
1

There is a hidden auto-increment field _CustomObjectKey. I don't understand there are so many hidden things from document, that is very hard for partners and developers. Also if you use AMPscript, GUID() might help.

0

Unfortunately, there's no such datatype in SFMC.

  • how can we solve the purpose then. My requirement is if new values are added, the id field should be automatically get incremented and added along with the other values and the field will act as a primary key for that data extension. – Madan Jan 20 '16 at 19:22
  • There's a unique _CustomObjectKey for every row in a Data Extension, but it's not visible nor can it be part of the primary key. It is accessible via Query Activity. Either you'll need to set the auto-increment key in advance or choose another column to use as a Primary Key. – Adam Spriggs Jan 20 '16 at 19:32
0

I've used one solution for this. Copied from one Data extension to another data extension. There I have used like:

Select *,  _CustomObjectKey as ID from Dataextension1 

This is working fine for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.