Autonumbering Child file fields

I have a set of Parent/Child files and am not quite sure of how to make this work:

ParentIDLink - autonumbered
ChildIDLink - linked to the Parent record.
ChildSequenceID - autonumbered, but resetting with the Parent record.

In other words :slight_smile:
ParentIDLink = 1
ChildIDLink = 1
ChildSequenceID = 1 ! Tis is the field I want to figure

ParentIDLink = 1
ChildIDLink = 1
ChildSequenceID = 2

ParentIDLink = 1
ChildIDLink = 1
ChildSequenceID = 3

ParentIDLink = 2
ChildIDLink = 2
ChildSequenceID = 1

ParentIDLink = 2
ChildIDLink = 2
ChildSequenceID = 2

I was thinking I would have to write code to make the ChildSequenceID field get filled manually, but is there an easier way?

Use an autoinc key with the 2 prior key fields and the 3rd field. The last field will be numbered within the key group created by the other two values.

1 Like

1 Like

Thanks for the reply. I dont know what I was thinking, but you got me on the right track