Move Fields to different table

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
vpiperi
Posts: 9
Joined: 2020-10-03 14:45

Move Fields to different table

Post by vpiperi » 2020-10-03 19:13

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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Move Fields to different table

Post by pbottcher » 2020-10-03 19:19

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).
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

vpiperi
Posts: 9
Joined: 2020-10-03 14:45

Re: Move Fields to different table

Post by vpiperi » 2020-10-04 06:48

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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Move Fields to different table

Post by pbottcher » 2020-10-04 12:03

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.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

vpiperi
Posts: 9
Joined: 2020-10-03 14:45

Re: Move Fields to different table

Post by vpiperi » 2020-10-04 21:11

What would the code look like? is there somewhere I can find a similar code?

Post Reply