Query binding triggers twice on embedded view

Hi!
I´m using a tree component that passes the selection parameters to a Embedded View. This View takes those parameters and executes a Query Binding related to a custom object.
However, I´ve noticed that sometimes the query itself is triggered twice when I chose an item from the tree.

I´ve tried to debug this behaviour and seems that the tree is only passing once the parameters, but the query does execute twice (although sometimes it behaves correctly, seems pretty random)

Has someone faced an issue like this?

Thanks!

Oh yes, I have struggled with this. Bindings are triggered whenever there is a change in the value of properties they are bound to, which makes sense, however, that also includes changes in the quality of those values. Just yesterday I was examining duplicate executions of code triggered by a binding, and saw that even though the actual value it was receiving hadn't changed, it's quality went from "Good_Initial" to "Good."

Also, if you have multiple parameters passed into a query, it might get triggered once for each parameter as their values change/update.

Hi Ryan,

I´ve found a simple workaround that consists in passing a single object parameter to the Embedded View with all the subparams and then bind all the queries to a custom object via scripting (the complete input parameter is binded to the complete selection prop of the tree, in order to avoid multiple param changes).

This easy trick solves my problem for the moment, as I have not noticed already those changes in quality you mentioned.

Hope you find this helpful!

2 Likes