Delete record if fieldA := fieldB
is there a way to completely delete the current record if a formula field results in a specific value or equals another given field?
Thanks for your reply RoSoft_Steven Rooryck
I tried but I can't seem to make it work.
I'll explain more in details what I have tried, so maybe you can spot my mistake.
I have a table named People and I have five fields (LastName, FirstName, Sex, Birthplace, Birthdate) and the values in these fields are used to create a unique value (FiscalCode) calculated via formula in another field in the same table (People).
I thought to put the trigger after update in "Birthplace" (which gets populated last) so that if the newly calculated FiscalCode equals one already created, the record gets canceled.
This is the code I've used:
let xFC := FiscalCode; if (count(select People where FiscalCode = xFC) = 2) then delete this else Birthplace
I'm using the Mac App and actually I have some problems with Triggers after update in general: they seem so work in a random way (the same formula, in the same field type, sometimes works and sometimes not). Often I need to close and reopen the app to have the changes applied.