How to know that a popup deleted a record?

On a page that displays record details for editing, I have a button to delete the current record.

image

The button shows a reusable popup that asks for confirmation to delete the record.

image

Clicking Delete it causes the popup to delete the current record. Keep It or escape or clicking away from the popup causes the record to be retained.

If the record is retained, the popup closes and the record detail page remains active.
If the record is deleted, the record detail page should go back to the previous page.

Unfortunately, the record detail page doesn’t know what the popup did. It simply showed the popup and its workflow ended. It doesn’t know whether or not it should go back to the previous page.

Being a reusable element, the popoup cannot know what to do because it doesn’t know what the page that showed it would want done after the record is deleted.

Is there any way the popup can trigger a workflow on the invoking page and communicate that it deleted the record so the page knows what to do?

Invoking pages can use when pop-up opens and closes events, and custom states are the one thing that can been seen both from inside a reusable element and outside, from the page it sits on. Would either of those work?

Try this: add a “Do when condition is true” workflow event on the page. “When current Page’s Thing is empty > Go to previous page”

When the record is deleted, it’ll trigger this event and run the workflow from the page.

Another method: you can read custom states on a reusable element from a page, so if the record is deleted > set state to deleted = yes (or something). The page can pick this up with “Do when popup’s state = yes” or “When popup is closed and state = yes”

Thank you.

Between your suggestions and @mebeingken’s, I have a few things to try and have learned some valuable insights into Bubble.

This topic was automatically closed after 70 days. New replies are no longer allowed.