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 571
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