Hi
I have a Ceilings for supplier form. In that, I can establish a few ceilings of purchase for supplier and year
My question is:
How can I verify that the year and the supplier don´t have establish a ceilings when the user create a new ceilings for that supplier?.
Thanks.
you could do this with onRecordEditStop of the form
or with a table event on insert and check there if it can be inserted.
you could also catch this by having your newRecord() overwritten and better streamlined so that users cant set the wrong values.
Thanks, jcompagner but which instruction should I use to check whether this record already exists
Thanks again
you can do that by query
or by relation (self relation)
so if you have a record where X and Y need to be unique for that records (do put these constaints on the database!)
then you can have a self relation where you say X = X and Y = Y on the same tabel.
Then in onRecordEditStop you just check if that relation has rows, because if it has then there are records in the db with those same values…