The record number of a table is it's line number. So if you have a LineItems portal on an Invoice layout, just use your text tool and type @@ into the portal row to display its line number.
The problem with wanting to insert the number as data into the record is that, if you delete a line, you will have to renumber your records. Not only is this inefficient but it can break in multi-user as other Users might also be adding, deleting or 'renumbering' lines.
So it is best to let it be handled dynamically using the record number symbol itself.
Thanks for the support. I don't quite understand what you are saying. What do you mean by type @@ into the portal row. Sorry.
You know how to type a label using your text tool (the 'T')? Just type @@ on your layout and then drag it into your portal row. @@ is the symbol for record number and, if it is in your portal, it will produce the line number (record number) of each LineItem.
Oh, that was too simple.