How to update the screen after closing the popup? (Also popup doesn't show correctly)

Hi! Im trying to achieve this context with Outsystems:

There is a ProcessDetail screen that has a button "Add Section". When this button is clicked it should open the popup "New Section" to create a new section. After creating the section the popup should close and the new added section should appear in the process detail screen below the button using ajax without page refreshing.

But its not working. When the "Add Section" button is clicked the popup opens but doesn't show the content that I have in the NewSectionPopup screen (the form with 'Name' and 'Order' to create a new section), it shows a blank content. Do you know why the popup doesn't show the correct content?

And also, Im a beginner in Outsystems and Im not understanding how to properly update the Process Detail screen with the title and order of the new added section after the popup is closed using Ajax. Do you know how to properly achieve this? 

I have this example in the image in the OML.



Rank: #68

Hi Jake B.

The information was not appearing because you had a modal inside the layout of the popup. The modal is not compatible with popups, you should use one or another.

I removed the modal and place the Form in a container with white background and some padding:

To put the popup communicating back to the screen, you need to use Popup_Editor_Notify from RichWidgets to notify back the parent screen:

And then on the OnNotify, you just have to Refresh the query in order to get the latest sections and AJAX refresh the part of the screen you want to:

Note: In order to the AJAX refresh, you need to name the part of the screen you want to refresh, in this case, I named the List to LR_Sections, like this:

OML in attachment.

Hope it helps.




Rank: #17195

Thanks! Im new in the forum, you attached some OML to your answer? Im not understanding where the attachments appear. It seems that I don't have that Popup_Editor_Notify server action!

Rank: #68

Hi Jake B.

I think it disappeared, I reattached it to the message I had sent.

You should be able to dowload it now:

The popup actions you can get them from RichWidgets: