Hi! I´m constructing an editable grid in which the user can add new rows (purchase order lines). I would like to add a column with the number of the row as an "identifier" for each PO line, something like this:
So my question is, how can I configure the text field to auto-generate values from 1 to infinite after the user adds a new row?
Thanks for your time!
Discussion posts and replies are publicly visible
Is this just a number, or should this become the primary identifier for this item?
And what is the purpose of this number? Is that something you really need? I built similar grids many times and never included such a number.
I want this number to be the identifier of the line for EACH Purchase Order. In order to explain myself, what I want:
PO 1
- 1 --> PO 1, material, price, quantity
- 2 --> PO 1 material, price, quantity
If I create another Purchase Order (re-start process):
PO 2
- 1 --> PO 2, material, price, quantity
- 2 --> PO 2, material, price, quantity
To save the lines of the PO, I created a record in which id_Line_PO is the primary key. But with this configuration, it appears something like this (if I create a new PO, the number auto-generated in the record is still acumulative):
If I create another Purchase Order:
- 3 --> PO 2, material, price, quantity
- 4 --> PO 2, material, price, quantity
My purpose is to identify each PO line inside a PO
OK, then it is just some number, but not the primary key of the item. That is OK, but it's important to differentiate. And you cannot use that number as the primary key in the database table.