how do i use a child record on a parent table?

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
what I mean is, that I want value on the child's table on the parent table.
I have a relationship that goes from Customers to Invoices, I wanted to copy/link one of the records on the invoices table to the parent table. I was told making the relationship back and forth like that is not good, so someone please help?
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
Whats the criteria for the one related invoice you want to link? most recent? something else? You could create a summary field that chooses the maximum record ID for the child table. This should give you the most recent. However you can add additional criteria like if a field is set to a certain value, then it will be the most recent record that matches that criteria. Then on the summary field, choose to link to the related record. Place that summary field somewhere on your form on the parent table. Make sense?
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
Without creating another relationship to pull the child record values back up to the parent all you can really do is create a link to the record. Not pull the value.  Without custom script that is which would be simple and happy to show ya over screenshare if you like. But you could still set a criteria on the date field.
chuck@chuck.support
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
whats the safest way without errors? what you prefer is what i'll do
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
Safest maybe just creating a report with your criteria and showing that on your form on the master table. If you only want one field from child then only use that field in the report. Filter it down until you only return one row. 

If you really just want to populate a field or display a single value and are ok with some custom code contact me and I can show you how it would work with a demo. Thanks and good luck!
chuck@chuck.support
chuck.support/donate
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
as long as you could break down the code and explain it to me then I'd be fine doing some custom coding.
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
Yes, definitely. Please email me directly and we can setup a screenshare and a call.
chuck@chuck.support