Syncing a table after editing a child table through detail view

I am trying to “bring current” a parent table after updating a child table.
I really just needs to happen one time a day, prior to a report being sent out.

Right now, sometimes the report comes back incomplete because the parent table doesn’t automatically sync when a child table is updated

1 Like

As virtual columns will recompute when you sync, and the sending of a report includes a sync, I’ll have to assume the problem is not with out-of-date virtual columns.

Non-virtual columns with computed values will only be recomputed when their row is updated with a form save, or when their row is updated by an action. If you have non-virtual computed-column values, you’ll need to find a way to make a change to the row prior to the report.

1 Like

Hi @Steve

I’ve had the same issue @Dan_Oliphant is having right now. In my case it was a non-virtual computed column that should add an amount to parent table after a child table is added / updated.

I haven’t tried this but If the only way of updating the parent table column is by updating the record, could we create an extra column in the parent table that just adds 1 to itself everytime an workflow action is triggered by the add/update of the child record?

Does this make sense ?

This is the solution I was thinking could work. I haven’t implemented it. I was also curious if a data change workflow from one table can trigger an action to another table

1 Like

Sure! Though you should probably have the workflow action itself increment the value.

My approach is to use an action of type Data: set the values of some columns of this row to set the value of my Refresh column to the result of the expression, UNIQUEID(), which will always be different.

2 Likes

Eloy, did you have time to try this, and did it work?

Steve this doesn’t seem to work as I understand it. I have a parent table and a child table. I create an actions, exactly as you describe for the parent table, (set values of some columns in this row.) Then I go to workflow, where I create a workflow for the child table. Reaction is Change Data, but when I go look for the action, it only has the actions for the child table. Not the parent table. Could you please clarify?

From the child row, you need to perform an action of type Data: execute an action on a set of rows with a referenced table of the parent table, referenced rows of LIST([parent-ref]) (where parent-ref is the name of the Ref column in the child row that refers to the parent), and a referenced action of that action you added to the parent table.

I also tried to make the column Refresh a ChangeTimestamp, but that wont work for virtual columns (even though it allows you to add them)

Thanks for the clarification. I set it all up, and now the column changes value on the edit of the child table. But it still does not update the other columns, like a sync would. is there one final step i am missing

You’ll need to prompt the action to run. If the child column will be updated through a form, you can attach the update action to the form as the form’s Form Saved event action. If the child column is updated by another action, you need to attach the parent update action to that child update action. Alternative to both, you could add an update workflow on the child table that performs the update parent action whenever a child row is updated. The workflow option requires a sync to be seen by the user.

got it! takes a while for it to sync in the background. Is that to be expected?

Yes. That’s the downside of using a workflow for this.

ok thanks so much.

1 Like

Steve’s answer is best, when it comes to automatically updating parent table, but the sync takes a long time. the bestsolution for my purposes is just creating a overlay action on the detailed view called Update. the user once changes are made to the child table within the detail view of the parent table i have an action that updates the non virtual column. you just press it.

1 Like