Table does not show child records on Save/Query

  • 1
  • Question
  • Updated 2 years ago
I have a table that shows records, with child records showing in the last column of the table.  I have a pop-up that is used to add a new record and child records to the table.  The "save" button on my pop-up saves the parent and child records and then queries the parent and closes the pop-up.  I would expect that querying the parent would cause the new child records to show in the table, but instead, the new parent records shows without any child records.  I have to refresh the page before they show.  Any ideas about how I can get them to show immediately?
Photo of Elissa Bradley

Elissa Bradley

  • 1,692 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Jared Jones

Jared Jones

  • 2,214 Points 2k badge 2x thumb
You mention that after the save, you are querying the model for the parent, but not the child records.  Add the model for the child records to be queried after the save as well.
Photo of Elissa Bradley

Elissa Bradley

  • 1,692 Points 1k badge 2x thumb
Hi Jared,

I don't have a separate model for the child records - they are queried as part of the parent model.  (I do have a model for the child records in my pop-up, but the model for the parent/child records in the underlying table is separate.)
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
There are two types of queries a replace data and an add data. Try the other type of query. Not sure if this will help.