18
Views
5
Comments
Solved
Reactive | Popup to select row from table with block event to pass data parent
Question

Hello, 

Trying to get the following situation implemented:
- Page with form, user press search button (see red arrow below)
- Popup opens and shows data from a table
- User select one row from that table, pop-up closes
- Based on the Id selected from table row within popup, 3input fields could be filled (see red box below)

I'm using Reactive web. So first I simple created the popup, following below manual
https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Inputs/Create_and_use_a_Popup

Secondly I built an WebBlock with Event hander and added that WebBlock in the popup following below.
https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Reuse_UI/Use_Events_to_Propagate_Changes_From_a_Block_to_the_Parent 

Now the issue is that I can't get the value from the popup WebBlock in the Client Action which I assigned to the handler from the WebBlock.

What am I doing in an incorrect way? I just want to pass the Id from the selected table row to the parent screen

Thanks in advance!


Rank: #68
Solution

Hi Daan,


You can add a new argument on your handler Goods_UnCodesEvent and you will see that when you will be filling the parameter on your image (where it now says New Argument on your image), you will be able to select on the row the parameter that you specified on the Event.


Let me know how it goes.


Cheers,

João

Rank: #68

Hi Daan,


You can add a parameter on your Event to pass information from block to parent, just right clicking on the Event:

In the example, I'm going to add a parameter In1:


Now on the side of the parent, the Handler receives the parameter:


On your example, you just have to apply the Id you need instead of the In1-.


Hope it helps.

Cheers,

João

Rank: #4938

Hi João,


Thanks for your reply! I have already an input parameter, called UnId.
But within the Handler Goods_UnCodesEvent you see below, I can't select that parameter.

Thanks for your help!



Rank: #68
Solution

Hi Daan,


You can add a new argument on your handler Goods_UnCodesEvent and you will see that when you will be filling the parameter on your image (where it now says New Argument on your image), you will be able to select on the row the parameter that you specified on the Event.


Let me know how it goes.


Cheers,

João

Rank: #4938

Thank you! That part was indeed missing.
After adding that part I was able to set a variable with the input of the UnId parameter.

Kind regards, 

Daan


Rank: #68

I am glad I could help :)


Cheers,

João