Add automatic code to data table rows

Hi all
I was wondering if there is a method to add a column in a data table to get the code for evey row inserted by a user, in an automatic way.
Thank you

Can you please give an example of what "the code for every row" would look like? I am not sure what you mean. Say a data table contained the following.

Name  Height  Weight
Steve  1.7      60
Mary   1.5      50

What would be in the new column?

Thank you for your attention! The table could look like this, where the "Name" is the code for each person:

Name Height Weight
person_1 1.7 60
person_2 1.5 50

Maybe a simple solution would be to be careful and use different "Name" each time, but this is rather prone to mistakes.
Also, in a session a row could be deleted, and so next time we would not know if a given Name has been used in the past. So, I thought to allow Name to be filled in automatically. A solution, could be that in every session the first available code would be sth like max(Name)+2 (so in this case person_4). Is it possible to automate the process with DT?
Thanks a lot!

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.