How can I trigger from my webscreen a server action that is in mine webblock?

Hello,

I try to trigger from my webscreen to a server action that is in mine webblock. I try this with input parameters I have a variable in my webscreen called save this is a boolean. When I click on my save button thats in my webscreen I call a server action that sets my variable to true. And I have a inputparameter in my webblock thats is linked to my local variable that goes also to true. But what do I need to do further so this can work I don't know how to trigger my server action now.


Hello, 

I hope this may help you.

Nikolai Kaplin wrote:

Hello, 

I hope this may help you.

I try to understand but I dont understand what they mean with a widget_click action I cant find something like that?


Nikolai Kaplin wrote:

Hello, 

I hope this may help you.

Do I need to do a check in the prepartion of my webblock? And if the input variable is set on true what do I need to do then? I made a button in my webblock and make it non visible I set the destination to my server action. But how can I trigger that button?

Like Nikolai Kaplin said  use the Widget_Click 


Solution

Hi Halit,

You can see my implementation example, in the following link, as well as the attached file.

https://joao-delgado.outsystemscloud.com/WebScreenWithWebBlockInteraction/Entry1.aspx?_ts=637081136611049962


You are already near to your goal. Indeed, you should create a local variable, of type boolean, that will feed your weblock input. When you interact with your web screen, it will assign a True Value. 

In the webblock preparation you will check, with an if, to see the value that the input value is bringing. If it´s true you will call an action, that can be found in the richwidgets (manage dependencies), named Click Widget.

In the webblock you will have a button, that you can hide using CSS, and will have an action associated with it. The action that you want to run.


I hope this helps you.


Best Regards,

João Delgado


Solution

Thank you very much everybody! 

I was close but I fixed it now I have learned something new the function Widget_click. 

Thanks again for the reply's and for your time. 


Greetings,


Halit Ozdogru