11
Views
6
Comments
How can I expose a property of a Webblock link to parent screen's variable
Application Type
Traditional Web
Service Studio Version
11.10.7 (Build 37469)

Hi 

I want to create a WebBlock, It has an exposed property, That can bind to the parent screen's variable, like Combox's Variable property.

How can I achieve this? Any suggestion is welcome.

Regards

mvp_badge
MVP
Rank: #17

Hi Tom,

Using Events in your block and an event handler in your parent screen or block you can communicate data back from a block to a parent block or screen.

For more info see:

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

Regards,

Daniel

Rank: #297

Hi Daniël 

Thank you for your reply.

I know I can use an event handler to pass data to the parent screen.

But as I mentioned in the question, I wonder if I can create a property like Combox's Variable property,

The image attached.

So I can bind a local variable of the parent screen to it.

Kindly Regards

ComboBox.jpg

mvp_badge
MVP
Rank: #17

You can only do that by a local variable in the screen, that you change thru the event handler that is fired by the block.

Rank: #297

Hi Daniël 

Thank you for your reply.

Ok, I understand. Just wondering how the Variable property of ComboBox or Input control implemented.

Kindly Regards

Rank: #297

Hi 

Does anyone have other suggestions?

Or should I give up?

Regards

Hi Tom,

I think your idea is similar to creating a pattern.

How about you put in the block the combobox instead, use the input parameter as the local variable of the combo box. Then you know the rest I think on how to bubble it up to the parent.

Hope this helps.

Thank you and kind regards,

Chris