I have a form with 2 fields as primary key (filed1 and field2), field1 is a foreing key for my form master-detail and field2 is a field that count the records created.
For example:
Table Master
field1
1
2
Table Detatil
field1 field2
1 ------1
1 ------2
1 ------3
2 ------1
2 ------2
The question is how can i generate the value for field2 ? it is autoincrement for each field1 (i tried onbeforeinsertrecord) assign a value through of a function, but SC not alow do it.