Update Parent record from Child record over form

Dear Community.

My next challenge in the subject.
When I want to modify same formation with static value, thats OK.
My problem: how I can modify one value in parent row from child Form with dynamic data…?
From parent table column value showing a child form. I want to update this value in parent table, if I change this value in child form.
I created same things when I update same value with static data, in this action no need formula.

Its a dynamic value what I can’t know to think a formula in Action, where I update parent row.

Real: when I modify the phone number (this value from parent table with lookup() formula) in child Form, I would like to update to parent phone number to this value. Of course, every parent record have different amount of child records, I use classical ref_rows().

How I can found a formula to Action (DATA: set the values of some column in this row)?

Thanks.

  1. Create an action on the parent table of type Data: set the values of some columns in this row that sets the columns of a parent row from its children.

  2. Create an action on the child table of type Data: execute an action on a set of rows that targets the parent table, uses the parent as the referenced row, and performs the action from (1).

  3. Attach the action from (2) as the Form saved event action of the child table’s form view(s) and/or setup a bot that triggers on adds and updates to the child table and performs the action from (2).

1 Like

Thank you.

I rtyed this stept yesterday, but I not found a formula to read the relevant modified child value in parent action (set the values of some columns.

The actions are not functioned without columns and values, after save app, the system say errorrs.

@bthomyka ,

This option should work (look for screenshots):

  1. check that there is a valid relationship between the tables;
  2. use the action Data: add a new row to another table using values from this row;
  3. fix this action to save button (behavior) in Child_Table.

1 Like

Thank you.

So the “Add new record” not a best solution, I would like to modify the existing record in parent table.
In the child table have ID for child records, and PID for parent record ID, I use ref_rows().
Different column between 2 tables:
Parent table column Phone
Child table column AltPhone (alternative phone number).
I thinking long time for formulas and expressions, but I not found for read relevant value from child record.

You just need to specify all other existing columns in this action and overwrite their own values. So if the record (ID) does not exist, it will be added, and if the record does exist, it will be updated with the specified values.

The example only specifies the discussed columns. All other columns must simply overwritten with their values. This method has been used many times in fairly large and complex tables with many ref-links and it absolutely works.

Im search the formula / expression for this.
I tryed select, filter, lookup, and I can’t solving. The select() formula in parent action sometimes was good, but not found Phone things (In this moment I can’t citate the error message).

But you need not a parent action. You need a child action if you want to control updates in child table by save button in child form.

Maybe you don’t understand.
I want to modify the value of parent record over child form. The value are in child record, I want to use this value for overwrite relevant value in parent record.
For this, I need modify action in parent section, but I not found formula or expression to use data from a possible and relevant child record.
Maybe here I write clear for my problem.
The plan is check the relevant child value, if not equal this with parent value, need to modify in parent table. For this checking no problem with formulas.

If you still want to check by an action from the parent table, then refer to child rows via a REF_ROWS, e.g.:

[Related CHILD_TABLEs][Phone]

or try to use FILTER(“CHILD_TABLE”, …) or SELECT(CHILD_TABLE[Phone], …) with condition

[Parent]=[_THISROW].[Parent_ID]
1 Like

Thank you, we go to road of solution.
The problem of [Related Child_table] are random record… or not?
Every parent record have different child records, not only one.
Some parent have 3 line in child, some parent have 1 line in child, some parent have 8 line in child.
Im search a solution when I adding a new child record, and if I modify the AltPhone column, then this value go to relevant parent column.
Here I not have solution for parent action, I can’t reference to relevant child record column, I not know, how I must write the select() or any formula to take the value from relevant child record, what I storing, where I modify AltPhone column (in child table).

You can add MAXROW() filter or more complex filter of latest row.

2 Likes

Thank you.

Im trying this arrow and I come back with result, ASAP

Thank you, Im working with Maxrow() and [RelatedChildTable] options.