Hello,
this post is actually related to this topic: http://forum.servoy.com/viewtopic.php?f=22&t=11398.
There are two tables involved in my problem, the customer table and the membership table. If a new membership is created, the status of the respective customer is recalculated. I do this by calling a function onRecordEditStop. Input parameter of this function is the primary key of the customer. So far it works fine.
Now a membership can expire. If it is active or inactive is determined by a (stored) calculation, depending on the expiration date and the current date, along with a few other conditions. When opening the solution, I do a recalc of all memberships.
a) If a membership is updated to active=null (using the calculation), does that trigger the update table event?
b) Can I specifically use the respective customer id of the record(s) that was updated? I.e. the ID should be passed as an parameter in the global method…
Is that possible? If it is, I could also use the same functionality on the insert event and wouldn’t even need the onRecordEditStop event…
Of course I could also just loop through all customers, but this would take quite some time and I’d like to just go through those, where the active flag was changed. Or should I do a SQL update (set based) in the global method and flush the cache?
Thanks,
Reto