So I have a block inside a screen that has an OnParametersChanged applied

And it has couple of input parameters

For the trigger, I have a button that change 2 of the parameters

Its rarely occurred, but it seems that parameters change had run the OnParametersChanged function twice at the same time, that causing twice insertion of data and make a stopper to our data flow.

How does the Event works if we need to change more than one parameters? Or is it encouraged to just make one parameter changed? Thanks

OnParametersChanged is triggered every time an input parameter is changed. 

If you do not necessarily need the information stored in the input parameters for the handler, you can use a boolean that you set at the beginning and at the end of the handler to keep track whether the handler is already currently running. This way the action is triggered if you change either one of the inputs, or both of them.

Sam Rijkers wrote:

OnParametersChanged is triggered every time an input parameter is changed. 

If you do not necessarily need the information stored in the input parameters for the handler, you can use a boolean that you set at the beginning and at the end of the handler to keep track whether the handler is already currently running. This way the action is triggered if you change either one of the inputs, or both of them.


Thanks for the reply, Sam

But still, if I have 2 parameters, and I change both of them in a single Assign, and based on how the function works ('"OnParametersChanged is triggered every time an input parameter is changed"), the function will fired 2 times, right? The case was just, which process will be executed first. Or is it safer to use just 1 parameter?

Hi Raditya Uno,

I had implemented the same scenario in my personal environment and I observed (Debugged) that the OnParametersChanged event is getting triggered for only once, even though the block consists of two input parameter and is assigned on the onClick button action at screen level.



Kind Regards,

Benjith Sam