Populate all data in one table to another table with one button

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have a master table and a child table. When a record in child table is created, I need to populate all master table data into a log table with similar fields of master table.

What kind of approach should I take? Thank you.

Photo of Kp

Kp

  • 14 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,332 Points 50k badge 2x thumb
It sounds  to me that you're saying that when a child record is created you want to snapshot or freeze the values that existed in the master record at the time the child was created.

Here is a link to some help information on setting up snapshot fields. http://www.quickbase.com/user-assistance/Default.html#setting_up_snapshot_fields.html

Basically what you do is you bring down the look up fields as normal perhaps calling them with a name that is Suffixed (look up) and then you create field similarly named except perhaps suffix named (snapshot). And then you configure each of your snapshot fields to be frozen to the values of the corresponding look up fields.
Photo of Kp

Kp

  • 14 Points
Mark, thanks for replying. Can it snapshot all lines of master table? I need all lines of data, and all fields.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,332 Points 50k badge 2x thumb
Well, Yes.  If you have 100 Master record fields, "just" set up 100 lookups and 100 snapshot fields.  There is not mega snapshot magic functionality.  Just one by one.

I don't understand though what you mean by "all lines of data".  I understand "all fields" but what did  you mean by "all lines of data".  The snapshot freezes a lookup of what values were in any given Parent record when the child was connected to the parent, Typically when the child was created.
Photo of Kp

Kp

  • 14 Points
what you suggested would capture the child record and parent record. I would like to capture all other non related parent record.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,332 Points 50k badge 2x thumb
What i am suggesting will capture the values of the Parent Record at the time the child was created.  So now i am confused by what you are wanting.  Say you have 10,000 parents.  On Parent Record ID 1234, you go "Add Child" and add a child.  Surely you are not looking to record the value of all 9,999 unrelated parents??
Photo of Kp

Kp

  • 14 Points
I think you are right at this point, unfortunately, I do need the other 9999 parents. In other word, I am trying to capture parent table the status of every moment when a child is created.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,332 Points 50k badge 2x thumb
Well that is well beyond what native QuickBase can do.  It is possible however, to create a button to copy records from one table to another.  Even to copy all records from the Parent table to some kind of Parent History Log table.  I don't know how to trigger that automatically when a child record is created though, without using a third party service (say the boys at Juiced) to receive an email notification and trigger that copy process.