Passing dynamic data to Pop-up

  

Hi,

I want to write an Id on a Input Widget and click on a Button to go to a Pop-up with a Input Parameter of that Id I just wrote.

But that id is always 0, how can I assign what I wrote in the Input Widget to the variable that the Pop-up receives ?

Solution

Hi,

You have to remember that you are assigning to the Input Parameter of the link/button, a variable, right? When you type an ID in the input, the link is already there, with the value ZERO. If you press the link, it will send the value it has: ZERO.

So, how do you change this?

You add a OnChange event to the input, that updates the variable and do an Ajax Refresh in the link so it will now have the correct value.

From the top of my head, that is the solution.
Maybe there are others.

Cheers,
Eduardo Jauch

Solution

Eduardo Jauch wrote:

Hi,

You have to remember that you are assigning to the Input Parameter of the link/button, a variable, right? When you type an ID in the input, the link is already there, with the value ZERO. If you press the link, it will send the value it has: ZERO.

So, how do you change this?

You add a OnChange event to the input, that updates the variable and do an Ajax Refresh in the link so it will now have the correct value.

From the top of my head, that is the solution.
Maybe there are others.

Cheers,
Eduardo Jauch

Thanks, the OnChange event worked just fine, but I have another question.

When I click the button (Method: Navigate) that sends me to the Pop-up, how can I validate that anything was written on the Input Widget ?


Hi,

In the OnChange screen action, check if there is something in the input.
You can access it using the TypedValue property of the input:

If it is empty, you can disable or remove the button/link, thus avoiding the user clicking without providing a value.
It is good practice to check this in the destination, any way, and alert the user if he can get there without a valid value.

Cheers,
Eduardo Jauch

P.S. Remember to mark the answers that solve your questions as the correct ones, to help others with the same questions. :)

Thanks, that solved :)

Glad it worked. :)

Hi Eduardo and Diogo,

I have the same issue,I have done the same which you had explained above,but when i am doing ajax refresh in the link/button on an OnChange Action of the Input field.The pop_up is not opening up,its converted into a  WebScreen page.


hi Pratma, be sure to do the ajax refresh to refreshthe popup editor at the same time you do to the link/button. Ajax refresh changes ids.

Cheers

Eduardo Jauch

Thanks Eduardo,

Problem is solved.