Update Parent after Child is modified

Hi guys,
please how to update PARENT record when CHILD is created/updated/removed?
It looks like easy task but I spent already 2 days on this and I’m going crazy. Tried n community hints, but still no functional solution. Please, can someone help me?

regards Marek

It would be helpful to know what kind of update you are wanting to make to the Parent. If your Child changes are being made in the app from a form, there is a good chance you can update the parent there as well.

Since you have implied that you want the Parent change AFTER the child row is Saved then I’ll continue with that assumption.

I’ll assume you have the “IsPartOf” flag turned on for the Parent/Child relationship.

To make changes to the parent fields when a Child row changes you’ll need to create a Workflow that then calls an Action, call it Action 1.

In Action1 make it of type “execute an Action on a set of rows” and transitions to the Parent row so you can access the parent fields to make updates. The Reference Rows expression is simply [Parent ID].

Create a second Action, Action2, of type “set the values of some columns in this row” and assign it as the Reference Action in Action1.

Update Action2 to select the columns you want to update.

If you are wanting to update with information from the child row that just changed, you will need someway to identify that row so you can implement a SELECT() statement in the parent fields being updated to choose the value from that child.

I hope I have made it clear and it helps.

@marcotvic Please check the sample app “EventAction” from www.appsheet com/portfolio/531778. That sample app is updating the parent record when child record is added or updated.

1 Like

@Aleksi I think I just ran into the issue that maybe @marcotvic was initially referring to. I’ll call it Direct edit of a child record such as when selecting it from a Parent Detail view (not Edit mode).

I implemented your suggested process shown in the EventAction app. But I have realized that while I can now update the Parent based on Direct Edit/Add of a child, The Parent DOES NOT update when Edit/Add a child while in Edit mode of the Parent. My understanding this is because EventsActions on Form Save do not fire for children when changed as part of the Parent Edit.

So…leveraging your experience, is there currently in the UI a way to achieve both Child Edit use cases AND update Parent field with result of child Edit? Use cases are:

  1. Change/Add Child as part of Parent Edit.
  2. Direct Change/Add of Child - not initialed by Parent Edit

I am certain there are Workflow/Action solutions for updates AFTER the UI save, but that is less than ideal!