Workflow on delete

Hi,

When i delete a row from a table, the defined actions on that row donโ€™t work anymore because the values from the deleted row are no longer available. Is there a workaround for this issue?

Thank you!

0 9 579
9 REPLIES 9

Can you make it so the other actions run first and deleting the row is the last action to run?

Those grouped actions are triggered by the delete user action.

Disable the system-provided Delete action and create your own that does things in the order you want.

I have a similar situation. I have a form view for a child table. When the user deletes a row from this child table (which populates the parent table when adding or updating), I want to be able to re-populate the parent table with the most recent record left on the child table.

Youโ€™re suggesting that we can โ€œoverrideโ€ the delete action. When trying this, I can definitely lookup for the penultimate record (giving that the ultimate should be deleted at the end of the action). What I canโ€™t find is a way to add a subsequent action that deletes that last record.

Iโ€™d honestly appreciate your comments.

From your description, Iโ€™m not sure your situation is similar, but Iโ€™m not sure I understand your situation.

Parent tables typically arenโ€™t populated from child tables. Can you provide more details?

Iโ€™m sorry, Iโ€™m sure I used the wrong terminology.

I have a โ€œunitsโ€ field from a โ€œLotโ€ table. I also have a โ€œProduction Lossโ€ table which every time I add a row, it modifies the โ€œunitsโ€ from the โ€œLotโ€ table. So, that โ€œunitsโ€ value is modified by the last โ€œunits lostโ€ corresponding record on the โ€œProduction lossโ€ table.

When I delete a record on โ€œProduction Lossโ€ I want it not just to be deleted but also to run an action that brings the corresponding โ€œunitsโ€ value from the โ€œLotโ€ table back to what it should. In this case, lets assume that thereโ€™s a previous โ€œProduction Lossโ€ record that should be used again.

I definitely can โ€œoverrideโ€ the delete action by looking up for that previous record and use it to modify the corresponding "unitsโ€ value. But - after doing that - Iโ€™ll need another action to actually delete the โ€œProduction Lossโ€ record Iโ€™m intending to.

Iโ€™m hoping I made myself clear. Thank you in advance.

@Steve, @praveen I found a workaround,

Instead of โ€œsendingโ€ the values from the edited โ€œProduction lossโ€ modified table, I just created an action that recalcutes the corresponding โ€œLotโ€ record based on the premises I have, so it โ€œsearchesโ€ for the most updated information instead of โ€œreceivingโ€ it. I also created a behavior that triggers this action everytime I add, update or delete a โ€œProduction lossโ€ record.

Problem solved.

Thank you for your feedback

I think your โ€œworkaroundโ€ is the better solution.

You can definitely access the values of the row (just by using the column names โ€“ [Price], [Quantity], etc).
You can also explicity use [_THISROW_BEFORE].[Price] to access the version of the row before it was deleted. Though you donโ€™t need to because this is the same as just using the column name.

However, it sounds like you want to use a pre-defined action on the row and thatโ€™s what isnโ€™t being recognized? I tried this on a simple personal app and it appears to both succeed at edit time and at run time.

Top Labels in this Space