How to "clone from one side to another with no future harm"

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
arcanebits
Veteran Member
Posts: 104
Joined: 2018-12-10 21:52

How to "clone from one side to another with no future harm"

Post by arcanebits » 2021-06-29 16:59

Hi Guys, I may need a little help here, this is the issue
I have a “Hiring” table, users log in and post all their personal info and CV, so far so good.
I need to pass the needed ones (wich Human Resources select) to a “Employee” and its easy to do if you use the Lookup fields, but there is an issue.
I will need to be cleaning up the “hiring” table, and it wont be a problem but if you delete the record it goes blank into employee table, even if the “copy child records when copying parent” is active.
What I need is to copy a-la-lookup from one table to another, and be safe and sure that when that main table is cleaned up (since will be receiving CVs all time) it wont harm the current “Employee table”
Thanks in advance

arcanebits
Veteran Member
Posts: 104
Joined: 2018-12-10 21:52

Re: How to "clone from one side to another with no future harm"

Post by arcanebits » 2021-06-29 18:43

Anyone?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: How to "clone from one side to another with no future harm"

Post by jsetzer » 2021-06-30 08:50

Sorry, I don't understand your scenario. Can you post a few screenshots, database diagrams and/or sample-data for illustrating your current scenario and describe your requirements.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

arcanebits
Veteran Member
Posts: 104
Joined: 2018-12-10 21:52

Re: How to "clone from one side to another with no future harm"

Post by arcanebits » 2021-06-30 17:21

Hi, and thanks a lot for the reply, I will explain better in short bursts to acomodate my bad english and focus the problem
01-I have two tables, "CVs" for candidates and "Personel" for hired personel
02- CVs tables is a guest table where users enter their personal and profesional info
03- Recruiters then analize that CVs table and select who will pass to next level or be hired
04- Recruiters pass to another table "Personel" the records of people "hired" just by almost cloning using a lot of look up fields to populate "Personel"
------- Zero issues untis this point
05- As CVs es being hit heavily some cleaan up is necesary deleting rejected candidates and or moving them to another table
06- I If i delete a candidaten now a employee from "CVs" table, it will vanish also from "Personel" table, since it is full of lookups to "CVs"
07- Tried selecting the opcion that actually copies content from one table to the other, it does copy records, still when deleted from "CVs" Stil vanish from employees

I hope I explained better and see if i can get a little help.
Thanks in advance
Aldo

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: How to "clone from one side to another with no future harm"

Post by jsetzer » 2021-07-01 09:06

First thoughts:

Re: 06
If you delete a CV this means that candidate can not become personel. So the related personel-record can be deleted, too, if I got it right.

Re: 04
If there is a chance that CV record may be deleted afterwards you should not use Autofill-Lookup but copy values from CV record into related personel-record at the momen someone decides to hire that CV-person.
As an alternative you should deny deleting CVs as soon as they are "required" due to a related personel-record. This can be done for example in cvs_before_delete-hook.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

arcanebits
Veteran Member
Posts: 104
Joined: 2018-12-10 21:52

Re: How to "clone from one side to another with no future harm"

Post by arcanebits » 2021-07-05 14:08

Thanks for the reply! I will try that right away!!
Thanks again!

Post Reply