I have a table called invoice which has a column called invoice_no which uses a servoy sequence. The sequence is running perfect as long as the records are created from within servoy.
But I also have a php script which creates a bulk of records (every few months) which sets the invoice_no to max(invoice_no) + 1 for every new record.
After the script is run the servoy sequence is out of sync. So I have to manually sync the servoy sequence from the Servoy Admin page.
Is there a way to do this programatically?
I cannot use db identity for the invoice_no column since another column uses that.
This is a perfect sample of where it is desired to NOT let Servoy take care of the sequence.
Can’t you create a ‘servoy_id’ row if you can not use the one that is already there.
You can run a simple query with a function like ‘max(servoy_id)’ (by heart, syntax could be different) to retrieve the highest value.