-
Goal: Run the query with the expected data
-
Steps: Open/close transformer to try to force it to refresh
-
Details: I want to use a "pointer" (aka, the toggle) to point to the most recent data. The code that updates the data and toggle seem to be working (that is, the toggle has a value, "b", which matches the array that has 72 items in it). But, when I try to reference this in an transformer, on both hover over, and in execution, it uses the value, "a".
-
Screenshots:
Hello @nl-setech!
That is very odd that the transformer isn't reading the variable's data correctly.
Was toggle set to 'a' at first, then changed to 'b', then being accessed in the transformer? I was hoping this might just be a UI bug where the hover info was lagging, but if the code executes with the value as 'a' then we need to figure out why the transformer is out of sync with 'toggle'
My first guess is that this might be transformer specific, you might need to move the code logic from your transformer to a JS Query block.
If that still doesn't work, I might need to clone your app to test things out, or have you come to office hours where we can live debug and see if this is a reproducible bug.
Also, how are you changing the value of toggle in openTickets
?
There are two small details that could be the cause of this.
First is that if you are using .setValue
this is an async function so you would need to use the keyword await
to that this function completes before the code block finishes its execution.
The second is in the advanced settings for JS Query, you might need to toggle "Keep variable reference inside the query in sync with your app" to ensure the variable is updated in all of its references, including the transformer