Cannot bind input from numberinput into sql

  • 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.

  • Details:
    image
    image
    image

Hello @JDL1119

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.


image

&
If you want to use the directly numberInput value then use the default page query instead of global

1 Like

Hi @JDL1119, welcome to the forum! :wave:

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.

Here is our doc on the page and global scopes:

1 Like