Hello Guys
I have a form that insert values into the calendar table everytime i add a new record. The problem is that it doing the same thing also when i update the existing record just changing the time or the date of the record as result having same record many times in different places to my calendar.I use on validate event that's why it happent(work to add, update, delete). I thought to use on after insert or on after update events but i use these for other actions. So i think that the better way is to use an if statement to resolve the problem but i don't know how to use it. My tables are these:
Form Table: ran_id|| ran_title||ran_date||ran_time||doctor||patient
Calendar Table: c_id||ran_id||ran_title||ran_date||ran_time||doctor||patient
So i want to do these: On validate event if ran_id(form table)=ran_id(calendar table) update calendar with the updated data
else ran_id(form table) different from ran_id(calendar table) insert the new record to my calendar.
Can please someone help me…!!