How is your experience with the OutSystems Community?
54
Views
8
Comments
OnParametersChanged
Question

my question is how do i associate a variable in the parente with the input parameter of the block that will trigger on parameter changed


2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @Bernardo Cardoso ,

Any Input Parameter of the block changing from the parent can trigger the block’s On Parameters Changed event. 

In the parent screen, you bind the parent variable directly to the block’s Input Parameter from the block. On Parameters Changed does not run just because you assign something inside the block. It runs when the parent changes the value passed into the block input.

2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

To make On Parameters Changed fire, you just need to bind a parent variable to the block’s input parameter and then change that variable in the parent.

Step‑by‑step (Reactive Web / Mobile)

  1. Create the variable in the parent

    • On the parent Screen (or parent Block), create a Local Variable (e.g. SelectedProductId).
  2. Add the Block to the parent

    • Drag your Block from the toolbox onto the parent Screen.
  3. Bind the variable to the Block input parameter

    • Select the Block instance on the Screen.
    • In the Properties panel, you’ll see the Block’s input parameters (e.g. ProductId).
    • Set the parameter value to the parent variable:
      • ProductId = SelectedProductId This is the association that makes the block react when the parent variable changes. On Parameters Changed
  4. Change the variable in the parent

    • In any event on the parent (e.g. On Click of a list item, On Change of a dropdown), assign a new value to the variable:
      • SelectedProductId = <NewId>
    • Once this assignment runs, the Block’s ProductId input changes, and the Block’s On Parameters Changed event will be triggered automatically. Block events

Inside the Block

  • Implement the On Parameters Changed handler in the Block to refresh data or update UI based on the new parameter value (e.g. refresh an aggregate that uses ProductId). On Parameters Changed

In summary:
Associate = set Block.InputParam = ParentVariable in the Block’s properties, then change ParentVariable in your parent logic.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
UserImage.jpg
Bernardo Soeiro
how do i do this part Set the parameter value to the parent variable
2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

On the parent Screen (or parent Block), that step is done directly in the Block instance’s Properties:

  1. Select the Block instance on the Screen (in the UI tree or in the canvas).
  2. Go to the Properties panel (usually on the right).
  3. Under Input Parameters, you’ll see the Block input (for example Enabled or ProductId).
  4. In the value field of that input, type the name of your parent variable (for example SelectedProductId or EnabledVar).

Example:

  • You created a Local Variable in the parent: EnabledVar (Boolean).
  • Your Block has an input parameter: Enabled (Boolean).
  • In the Block instance properties:
    • Enabled = EnabledVar

That’s the “association”: you’re binding the Block’s input parameter to the parent’s variable via the value expression in the Block instance properties. When you later change EnabledVar in a client action on the parent, the Block’s Enabled input changes, and OnParametersChanged will fire. On Parameters Changed

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2026-03-27 07-32-35
James Padua

Hi,

I attached an image showing how a variable is associated with a child webblock's input parameter. You can do this by following below steps.

1. Create an input parameter on the child block

2. Place the child webblock inside the Parent block

3. Once the child webblock is inside the parent block, click and you will see the input parameter on the right side of your screen.

4. Assign the parent local variable to that input parameter


After doing this, everytime the parent local variable change its value, the OnParameterChanged event will be triggered inside the child web block. Let me know if you need more clarity.

Screenshot 2026-07-01 075925.png
2025-04-10 11-25-12
Diogo Reis

Hi.

Every input parameter in a block, when changed in the parent, will trigger the OnParametersChanged action.

If you want that just one parameter triggers that action, I have a solution for you.

You have to replicate that input variable in a local one. In the OnReady event, you set that local variable equal to the input one. In the OnParametersChanged, you check if those variables are equal. If not, you refresh the data action and, again, set the local variable equal to the input one.

If you have any questions, please let me know.

2024-10-05 13-30-20
Huy Hoang The

Hi u can set input param of Screen for input param of Child Block

when input param of Screen changes, the child block will trigger OnParameterChange() in block.

And if u want to change data in screen from block, u can create event in block and handle this event on screen.


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Note that all the valid answers are for Reactive only. If you have the misfortune to work with Traditional, you'll need to Ajax Refresh the Web Block (or a container it's enclosed in) befor the On Parameters Changed will trigger.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.