Is there a way to update the value in a parent table from a child table

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

I have a Student table and an Asset table. To reflect which Assets are issued to Students, I have a table "Issued Assets" that is a child to both Assets and Students. (I have done this so I can display a lookup for both students and assets.)

I'd like to update the Status field of the Asset table when an Issued Asset (child) record is saved. Is there a way of accomplishing this either through API code or using a dynamic rule?

Photo of Todd

Todd

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of Xavier Fan

Xavier Fan, Champion

  • 930 Points 500 badge 2x thumb
Can the Status field be a Formula-Text field?

i.e. If the Status of the Asset can always be calculated (based on the Issued Asset child records, and/or some other fields) - then you can have it be a Formula-Text field, and it'll update and calculate automatically.
If the information you want is in the most recently entered child record,mini Addition to Xavier's response, there is a technique to pull up information from that last child record into the parent.
Photo of Todd

Todd

  • 0 Points
Can you elaborate on the technique to pull up information from the child to the parent?
If you want to pull fields from the child with the highest record ID, ie most recent entry, then you can make a reverse relationship.

To do that, do a summary field of the Maximum Record ID# of the child records.  Call it [Record ID# of the most Recent Asset Record],

Then make a new relationship where 1 Asset has Many Students and use that new field as the reference field on the right side of the relationship.  Then just lookup any child records "down" to the Parent Student.