AnsweredAssumed Answered

Problem with serial numbers via a script

Question asked by wow001 on Oct 12, 2018
Latest reply on Oct 17, 2018 by hillio-dillio

Although I am using primary keys for the relationship between two tables, exam and exam pictures,

I take a copy of the database (no records) out of the studio to a clients where I carry out examinations add pictures

to the reports. (some locations do not have 4G or wifi).


When getting back to the studio I run this script as attached which exports the two tables exam and exam pictures from the offline exam file. Then imports them into the exam on the server.


All the reports and pictures come through perfectly.


As I am using primary keys for the relationship , I wanted the records to have a smaller number that the client sees.

So after the reports where imported and before the second table is imported I add a loop to add the serial number to the imported records.


This part is not working as instead of adding exam03527 to the first of the imported records it adds exam03557

I was adding 6 records not 31 records.

If I import 4 records it jumps by 13 records


I am using the loop incorrectly?



Screen Shot 2018-10-12 at 10.26.09.png


Screen Shot 2018-10-12 at 11.06.32.png