Page 1 of 1

Move Fields to different table

Posted: 2020-10-03 19:13
by vpiperi
we are using AppGini to build a Employee Onboarding database. Is there a way
for once the onboarding process is completed and the employee is active that
employee can be moved to a "Active Employee" table? and we want to do the
same thing for terminated employees

Re: Move Fields to different table

Posted: 2020-10-03 19:19
by pbottcher
Hi,

yes, you can use the after_update hook, test for your status and when the status is active, copy the record to the other table and remove it from the original (if that is what you want).

Re: Move Fields to different table

Posted: 2020-10-04 06:48
by vpiperi
Hi Pbottcher,

Yes that is exactly what we are trying to do but unfortunately we are having a hard time works with hooks. This is our first time using appginin.

How do we apply the after-update hook?

Thank you

Re: Move Fields to different table

Posted: 2020-10-04 12:03
by pbottcher
Hi,

the after_update hook is automatically called after an update of the record has been made. So you can put your code within the hook and it will get executed.

Re: Move Fields to different table

Posted: 2020-10-04 21:11
by vpiperi
What would the code look like? is there somewhere I can find a similar code?