Passing Data from Web Block to Parent Screen Without Refreshing Parent Screen

Hello,

I'm trying to make a Lookup Screen for user to search employee, I made a web block that consist of search balloon widget and then on the parent screen I will put the web block inside a modal. When user click on the row list inside search balloon widget (I wrap each row with a link that has destination to the Event) it then will pass the data to the parent screen.

The problem is when the data being passed to the parent screen, it will reload the whole parent screen which I don't want. I already tried changing the on click method for the Link in the web block from Submit to Ajax Submit but it won't pass the data to the parent screen.

Is there any workaround for this?

Hi Kevin,

You mention Events, so you're using OS11, correct? Could you show us what your Event handler looks like?

Hi Kevin,

Look like on parent screen there is no corresponding action to web block event.

Mykola (Nick) Tkachenko wrote:

Hi Kevin,

Look like on parent screen there is no corresponding action to web block event.

On the parent screen I assign the passed value from web block to the variabel inside parent screen


Afonso Carvalho wrote:

Hi Kevin,

You mention Events, so you're using OS11, correct? Could you show us what your Event handler looks like?

Yes I'm using OS11, for the event handler im following this documentation 

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Reuse_UI/Pass_Data_Between_Blocks


while debugging do you see value passed? If yes then you probably missing Ajax Refresh for the corresponding container to reflect updated value.

Hello Kevin,

You probably are using the Method Submit in the link.
Change to Ajax Submit.

Cheers.

EDIT: Sorry, didn't read up to the end. You are already using Ajax Submit.

Solution

Hi Kevin,

I was reading more carefully your question, and It is a little difficult for me to visualize what you are doing.

Could you provide your module, or create a simple module that can reproduce your problem, to make it easy for us to help you?

Cheers. 

Solution

Eduardo Jauch wrote:

Hello Kevin,

You probably are using the Method Submit in the link.
Change to Ajax Submit.

Cheers.

EDIT: Sorry, didn't read up to the end. You are already using Ajax Submit.

Hi Eduardo,

Yes, using ajax submit in the web block link didn't work, only submit works, but then it will reload the parent screen

Kevin Wie wrote:

Eduardo Jauch wrote:

Hello Kevin,

You probably are using the Method Submit in the link.
Change to Ajax Submit.

Cheers.

EDIT: Sorry, didn't read up to the end. You are already using Ajax Submit.

Hi Eduardo,

Yes, using ajax submit in the web block link didn't work, only submit works, but then it will reload the parent screen


When refreshing data on a form/screen you need either to submit, or to ajax submit in combination with data refresh and ajax refresh.

If you did this already, please send us your .oml because then there might be a less obvious situation going on.

Just one observation.

If you want to update a "form", it is useless to update its data source, as the form updates its internal data (Record) only when the page is loading (not on Submit or Ajax Submit).

In this case, you need to update the Form Record directly and then, if, on an Ajax Submit, Ajax Refresh the Form so that it is rebuilt using its own Record data.

Cheers.

Hi all,

Apparently ajax submit works to pass data from web block to it's parent screen, I just didn't notice it yesterday.

Thanks a lot for the replies!