Action to change data of child to parent

Hi all,

I have a table of “orders” and another of “payments of the order”, the table “orders” has a column called “balance” (this column has an appformula) and another called “counter”, how can I do an action that is run each time you add a record to the “order payments” table and even the “counter” in the “orders” table (this is done to update the “balance” column that has an appformula). I tried to do it with a webhook / Change data, but I can only execute actions from the “order payments” table, but in this case I would need to execute an action in the “orders” table. It’s something similar to the action: “execute an action on a set of rows”, but from children to father.

2X_3_3607afe765ae03050b9b7e47e847db146c81a73f.png

Solved Solved
0 4 985
1 ACCEPTED SOLUTION

You are on the right track.

Each child has the Parent ID which you can use to select the Parent record.

In the Action “execute an action on a set of rows”, you have the Referenced Table, Rows and Action.

  • Table = Parent Table
  • Rows = FILTER(“Parent Table”, [Parent ID Column] = [Childs Parent ID Column])
  • Action = action on Parent table that performs the calculation an updates parent

There obviously are some details left out. Please repost if you have more questions.

View solution in original post

4 REPLIES 4

You are on the right track.

Each child has the Parent ID which you can use to select the Parent record.

In the Action “execute an action on a set of rows”, you have the Referenced Table, Rows and Action.

  • Table = Parent Table
  • Rows = FILTER(“Parent Table”, [Parent ID Column] = [Childs Parent ID Column])
  • Action = action on Parent table that performs the calculation an updates parent

There obviously are some details left out. Please repost if you have more questions.

yes, now it works

thankssssssss

Dear all;

I’m having the same difficulty changing data of other tables. I have two related tables, one for sales order and other for dispatch of those orders.

In both I have a column called Expedição.

I have created an action to change the status of the cargo when its expedited, specifying that I only want to change the status of that order in the expeditiion form, as seen below:

FILTER(“Pedido”, [Número do Pedido] = [_THISROW].[Número do Pedido])

[This is what I’m trying to do: when a new row in the expedition table is created, it will automatically change the status in the column (Expedição) in the [Pedido] {sales order } table which has the same sales order (Número do Pedido).

Apparently, something is missing, or I’m in the wrong path. I’m stuck in the automation for almost 3 weeks, unfortunately.

In advance, thank you community for the support.

Regards;

Fábio Nabuco Correia

Dear all;

It worked!

For those who are having the same difficulty, here’s how it worked:

In the UX of the parent table,

Change the action in the end of the form to the one you’ve created, and when the form is saved, it will automatically trigger your action.

Hopefully, it will help someone, as many of you have contributed to my app development.

Regards;

Fábio Nabuco Correia

Top Labels in this Space