Input value not getting included in sql query

  • trying to have the value I write as a text input be included in the query

Currently I have a query pulling from a view, and my app has a text input where you can write the country. I want the text input (the country) to be used in the view name when running the query.

Here I have written FRANCE as the country input. When I reference it in my query, I am left with a "?" in the view name rather than the country (when looking at the sql prepared statement). The view name should end up being VW_FTT_FRANCE. How can I fix this?

Hello @abalamur ,

Can you try to use selectCountry.selectedItem.value or selectCountry.selectedLabel instead of .value?
Might fix the issue.

I beleive your solution is somewhere on this page in the docs.

Unlike dynamic values, you cannot use {{ }} embedded expression to dynamically specify names or actions (e.g., a column name or SELECT ).

it goes on to say you can 'disable prepared statements' for the resource

then use something like SELECT * FROM FIT_SECURITIES.VW_FIT_ || '{{ selectCountry.value }}' instead

Got it, disabling that seemed to solve the issue, thank you!

1 Like