Goal: trying to bind text/number input into sql. it works for legacy app but seems like new apps cannot pick up the input by {{numberinput1.value}}
Steps: created numberinput for value input. i am able to get the value with another text block to display the input value no issue with {{ numberinput1.value }}
However, once that snippet gets into SQL Editor. it shows error: numberinput1 is out of scope for this editor. tried to do it in 2 seperated sql editor. one with select and one assigning a variable.
I understand your issue,
If you are using the query in global then you are using this method:
Create a new variable in the query and, within the event handler for the numberInput, assign the component's data to the newly created global variable. After that, you can access the value of numberInput through that global variable.
Page-scoped components cannot be referenced by other pages/global scope. If we need to pass data from the scope of a page to the global, @WidleStudioLLP's implementation is an excellent approach.