170
Views
9
Comments
Solved
Webblock: return a list from web-block to parent?
Question

How to pass a list from web-block to parent?

Let suppose say I have list of payment data and I want it to send it to Parent screen from a web block. How we can do that...

Thanks....

mvp_badge
MVP
Rank: #15
Solution

Hi Rohan,

The way of doing it is by using events but there is a catch since is a list. since the screen action that will handle the event can't receive a list what you need to do is create a structure with 1 attribute that is the list you want to send to parent.

Something like this:

Regards,

Marcelo

Rank: #25869

can passing a list from child to parent block cause a performance issue?

Rank: #262

Which OS version are you using?

Rank: #443

Stefano Valente wrote:

Which OS version are you using?

For web Development Outsystems 11 but you can comment on both the version.  

Rank: #262

Thanks Daniel.

@Rohan:

In OS11 you have the ability to define your own events where as OS10 you can only use the OnNotify.

This means in OS11 you can define your own input parameters and use them in the parent.

OS10 yo uneed to put all your data in text. I try to avoid sending much information but if you need to you can serialize your data and deserialize it after the notifygetmessage function in the OnNotify event.

mvp_badge
MVP
Rank: #15
Solution

Hi Rohan,

The way of doing it is by using events but there is a catch since is a list. since the screen action that will handle the event can't receive a list what you need to do is create a structure with 1 attribute that is the list you want to send to parent.

Something like this:

Regards,

Marcelo

Rank: #25869

can passing a list from child to parent block cause a performance issue?

mvp_badge
MVP
Rank: #17

Hi,

Right was forgetting to mention what Marcelo wrote. Strange inconsistent behaviour of OutSystems.

Becaues why allow to define list in event when the parent event handler cannot handle it.

Also fpr mobile app development it does work without the need to create a structure, there webblock event and parent event handler can process the list.

Regards,

Daniel

Rank: #206

You have to create an event for the purpose and then needs to create an input parameter to send the data. When you trigger that event on a particular place by selecting the value of the input variable of the web block in the screen. The Input parameter will carry the data and use that data as per your requirements.

 I think it will help you,

Thank you,

Sudip


mvp_badge
MVP
Rank: #17

@Supid,

I think my and Marcelo's previous post already explained in more detail what you describe.

Regards,

Daniel