Need to copy fields from the most recent child record into the parent record.

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Acknowledged
We have a capital asset management application with a parent table Surface Lots and child table Documents. Each year, one of the documents placed in the Document table for each of the 179 Surface Lots is an engineering condition study that includes the date of the study and a condition rank for the asphalt and another for the parking space striping. I need to have the most recent study with the rankings update corresponding fields in each Surface Lot record. I've tried putting together a Quick Base Action, but cannot get it to work. The ranking fields in the Condition Study Document record are multiple choice text fields. I did set up a summary field for the study date in the Parent Table relationship, pulling the "maximum" date in order to get the most recent study. Ideas?
Photo of Scott Grund

Scott Grund

  • 390 Points 250 badge 2x thumb

Posted 1 year ago

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

QuickBaseCoach App Dev./Training, Champion

  • 51,486 Points 50k badge 2x thumb
Can you explain the field(s) you need from the most recent child floated up to the parent?  Is it just a simple ranking type field or a bunch of text fields.  They will determine the best solution.
Photo of Scott Grund

Scott Grund

  • 390 Points 250 badge 2x thumb
Child record fields to float up to parent:  Date  (date)   Asphalt Condition Rate (text)    Striping Condition Rate (text)

Child record is a document record that is filtered by a document type (Condition Report) and asset type (Suface Lot).  Have a number of other document records that I'm filtering out when the Summary Field: Maximum Record ID# is put in the relationship under the Master Table: Surface Lots

Does that help?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,486 Points 50k badge 2x thumb
I would just do a simple reverse relationship.
Get the Maximum Study date for studies which meet the criteria.  Call it [Date of most recent Engineering Conditions Study] 

Lookup that down to the child records.

Then a new summary field of the Maximum Record ID# subject to the filter that the Date of the study equals the [Date of most recent Engineering Conditions Study]  and any other filters like Study type = engineering conditions

Call this field [Record ID# of Most recently Engineering Conditions Study]

Then do a new reverse relationship where 1 document has many sites.  On the right side use that field you just created.  Then look up any fields you need from that Child to the Parent on that reverse relationship.