I am building a vet clinic app, in which I need to make sure there are no appointments being made for the same doctor at the same time of an already existing appointment.
Doctor1 has an appointment for 01/10/2019 at 10am. I need to display an error if I try to insert another appointment for the same doctor at the same date and time. But if 1 of the 3 properties is different, it should be added.
So basically what I need to know is how can I make a combination of 3 variables unique?
Thanks in advance,
You just concatenate the 3 properties together with an Arithmetic formula, then you can setup your unique constraint on that calculated field.
When using different data types your best bet is usually to convert everything to string. Be careful with padding things correctly so that things are really unique.
About This Community
|Asked: 10/1/19, 11:08 AM|
|Seen: 86 times|
|Last updated: 11/22/19, 11:06 AM|