Passing input parameters to a popup from a screen action

Hello,

I am using OutSystems 10.

I want to open a popup whenever a user clicks on a bar in a bar chart.

Whenever the chart diagram triggers the screen action the popup should be opened. I tried to trigger a click on a hidden link at the end of the screen action to achieve this. The link should pass an input parameter but that input parameter is always zero when the popup opens.

I looked on pages like this one (link), but could not find a workable solution for me. The input parameter is always set to the null value in the preparation of the popup.

The popup editor widget requires me to use a link that is set to Navigate. Passing input parameters to a popup screen might be done with Submit or Ajax submit?

Do you have ideas how to successfully pass input parameters to the popup from a screen action?


Kind regards,
Jonathan Seesink

Hi,

You can pass the input parameter like below.

In case its dynamic then you would have a variable mapped to the input and in the action you can assign a value to the input refresh the link/button and then do click like below

As you said the popup can only be open with a  navigation  destination.

So what you ned to do is create a hiden link or button like you said with the link to the screen as navigation.


In the screen you put an input parameter type text.


In the action that you are trying to open the popup you  create a json with the structure you need in the pop up and  assign that structure to the variable used in the navigation link i told you to create before then use a widget click action to click on that link.


Last thing inside the popup screen use a json deserialize to get you structure with all the variables you need.


BR

Hi Jonathan,

The thing to remember is that Links are created when the Screen is rendered after the Preperation has run, so any Input Variables to a Screen (which a Pop-up is) take the value they have directly at the end of the Preperation. The reason is that a Link is an HTML anchor, with the value of the Parameters in the href.