OnParametersChanged is triggered even if input parameters values are not changed

OnParametersChanged is triggered even if input parameters values are not changed

  

Hi,

I have a webBlock inside a tabs content and while debugging I have noticed that the OnParametersChanged action actually is triggered 3 times with the same values for each of input parameter. Shouldn't this action run only when the input parameters values are different from previous values? Or it is triggered whenever the value is assigned to the parameter?

Thanks for any tip where to look for the root of the problem.

Hello Mykola,

I don't see this behaviour in my test application.

Parameters changed in the same action will cause a single call to OnParametersChanged. Also, this event is being triggered only when there is a change in the value of the parameter. A simple assignment with the same value is not trigering the event.

But I'm not confirming this in debug, I am seeing the results in the screen. So, maybe it is a debug bug?

For you to test and see if you're doing something differently: https://eduardojauch.outsystemscloud.com/PreviewInDevices/?IsMobilePreview=True&DeviceName=Smartphone&URL=/OnParametersChangeTest/CounterScreen?_ts=636511035991260421

Cheers,
Eduardo Jauch 

Hello Eduardo,

Thank you for reply and a demo. I've made a test app and it was working fine until I set the input parameter of the webBlock as a DateTime Variable. 

On Tab2 I have 2 containers whose visibility can be switched via additional buttons on tab 2 content.

Now when the tabs are changed the OnPrametersChange Event is triggered with the same input parameter value.

Please see attached oml file.


Thank you.

Hum...

If you put your code OUTSIDE the Tab, it works as expected...

Exactly, but the problem is that in our app it should be inside the tab as we are using swipe navigation to switch tabs.

I tried with Time on both ends, but than the problem is different, every few clicks, the event is missed, and the next click triggers the event twice...

Ok, as a Workaround, use both the variable and the input as DateTime. This way it works as expected.

I'll see if I talk to someone to see if this is a bug and will come back here.

Cheers,
Eduardo Jauch