Updating a value in Child table when Parent is updated

I have a Parent Table with the following columns

  • Id
  • Game Date
  • Game Format
  • others

I have a Child table with the following columns

  • Id
  • Game Date (which references the Parent table with โ€œis part ofโ€ enabled)
  • Game Format
  • others

I want to keep the Game Format column in the child in sync with the value in the Parent tableโ€ฆso if the value in the parent is changed, the corresponding value in the child table needs to be updated for all rows where Game Date in Table 1 = Game Date in Table 2

Right now any updates to Game Format in the parent does not automatically update corresponding values in the child

Seen quite a few posts on this topic but unable to get it to work. Struggling especially with the expression to select the rows in the child table to update

Can someone please help

Thanks

0 10 1,842
10 REPLIES 10

Steve
Platinum 4
Platinum 4

What is the Ref column in the child table that refers to the parent row?

  • Game Date (which references the Parent table with โ€œis part ofโ€ enabled) - as I mentioned in the earlier postโ€ฆis this what you are asking for please?

Hmmโ€ฆ I hope not. Is Game Date the key column of the parent table?

Yes Steveโ€ฆon one date only one Game

Well, thatโ€™s going to be a problem, then: AppSheet wonโ€™t let you change a key columnโ€™s value after the row is created. Instead, consider making the Id column the key column. Note that changing it will break any existing references between children and their parent.

oh okโ€ฆjust wondering, its only the Game Format column that I want to update into the child when the Game Format in the parent is later changed

So lets say when i created the parent record the value of Game Format in the parent is XYZโ€ฆwhen I create a child table record the Game format column in the child table is auto populated with XYZ as I have a formula using a dereferenceโ€ฆ

The problem is when the Game Format column is subsequently changed to something else in the parentโ€ฆso how so I get the updated Game format value now in the parent to be updated into the Game format column of the child table

Hope I am clear

Ah, okay. I missed that earlier.

One approach is to convert the Game Format column to a virtual column. As a virtual column, the value would update itself automatically. The downside is that a virtual column is not stored in your spreadsheet. Would this approach work for you?

See also

Thanks so much Steve ! This works perfectly and everything falls into place

Just one more questionsโ€ฆ

How do you remove these In Line buttons?

3X_c_d_cda47a6b6fe663f5ede9d2e45062da9f74ee5a8e.png

Ok got itโ€ฆits from the Slice Actionsโ€ฆthanks

Hi Steve
I have same above problem but if i use virtual column (data studio google need to use child table to do report , it can not see virtual column. Can we have another ways?

Top Labels in this Space