Possible to show a popup as a step in an action flow?

Hi there,

I am trying to implement an audit system that displays a popup to the end-user whenever they try to save an entity. The popup shows the fields that were changed and prompts the user to provide a reason for each field changed. The entity is only actually updated after the end-user answers the questions on the popup.

So far I've been successful in detecting the changes made on the entity (re-using the CompareObjs Forge app). However, I am running into issues displaying this popup as part of my screen's save flow. The desired behavior is to show this popup, have it display the changes, require the end-user to provide a reason (text) for each change, and if all are answered, save this into the database in the audit tables, and then return to the original save flow to actually save the entity. Overall, I need this to be very generic so that it can be re-used for any entity.

So my question is as follows, what are the best-practices for displaying a popup as part of a flow (and returning to this flow after completion), and if it's not possible, what alternate way can I use to achieve the same desired outcome?

I know its a lot to ask for, but I've hit a wall here!

Thank you for your time,


Hi Martin,

Thank you for your input. I've previously completed the BPT course but I don't yet see a way to effectively use BPT for this. If you can give me any pointers for what you had in mind, it might be more useful.

Thank you,


Hi David,

It depends on what your databse looks like. But, like I see it, you can start the BPT when you push the "Save"- button. Store the changes in an audit-entity or local variable (containing therecord you want to change). Within the PopUp, you can now show the changes, without the loss of the initial values. After answering the question it is possible to update the initial values and clear the audit-entity (When using local variable, you won't have to clear anything. 

While writing this, I don't really know if BPT in necassary. You just should store the changes in an audit entity or in a local variable (with an input variable in the Popup)

Hi David,

I wouldn't use BPT for this, I can't see how this would apply to your usecase. If you want to display a pop-up after the user clicks a Button, just attach the RichWidgets Popup_Editor to the button, so that the Button triggers the pop-up? Then have the pop-up use a Popup_Editor_Notify to notify the main screen of the result, if needed.

Hi David,

Off the top of my head, the kind of thing you describe would need to create a new Web Block with:

  • a SaveWithPopup Button that will be the button the user will click
  • a hidden container with a ShowPopup Button and a Popup_Editor that will show the generic popup with the request for justifications and auditing logic.
  • a placeholder so the user can place their own Save button with the actual save logic specific to the form (should be hidden at runtime, and the only thing visible at design time)

"Submit with auditing button" Web Block that contains a button that when clicked:

  • The SaveWithPopup button should trigger an action that implements the generic "checking for changes" behaviour (you seem to have accomplished this);
    • if changes are detected, use Widget_Click to dynamically click on the ShowPopup hidden button;
  • Generic popup that needs to display modified fields, allow input of justification and implements logic to save to audit tables (you need to somehow pass the right data to the popup). If successful, use the Popup_Editor_Notify the parent.
  • OnNotify of the Popup_Editor, use Widget_Click to dynamically click on the hidden Save button.

This "flow" doesn't take into account that before you check for changes you probably want to perform validations, and requires several, independent (Ajax) Submits, which means multiple transactions (but there's no way of avoiding this if you are having interactions with the user throughout the save process).