AnsweredAssumed Answered

How to "increment" a number in a 1toN relationship

Question asked by FredH on Nov 15, 2014
Latest reply on Nov 20, 2014 by FredH

Title

How to "increment" a number in a 1toN relationship

Post

Hi experts, 

I have two tables (A & B) with a 1 to N relationship.
I would like to have an "incremental code" in table B grouped by its linked record in table A.  For each new record in table A, the code in table B should start at "1".  

What is the best way, using a script, to do this knowing that I will not create all records in table B at the same time?
I.e. :
A1 -> B1 : 1
A1 -> B2 : 2
A2 -> B3 : 1
A1 -> B4 : 3

Thanks in advance for your input!
Kind regards,

_Fred_
 

Outcomes