How to pass data from parent screen to web block?

Hi all,

As mention above, is there anyway to pass data from parent screen to web block inside it?

I know there is a way to pass data from web block to parent screen by using trigger event in web block but don't know can we do vice versa.

Thank you,

Huy,

Hi Huy,

Yes can pass data from parent screen to web block using input variables.

Regards,

Koushik

Koushik Prathi wrote:

Hi Huy,

Yes can pass data from parent screen to web block using input variables.

Regards,

Koushik

Hi Koushik Prathi,

I want to pass data at run time (click a button that point to server action, then it pass data to web block), not at preparation web block.

Huy,


Solution

Take a variable A and assign it to web block input parameter. On button click call the server action and assign the value to variable and ajax refresh the webblock. Attaching sample oml file which will help you.

Solution

Web block will run even the preparation after you do a refresh to that webblock on the main screen . So if you need to change the values in run time just make an action that change the input parameters and refresh the webblock.