using current field value in a jdbc clause

Confluence User - 15 Dec, 2019

Hi - I am trying bind a select box with a jdbc query that references a drop down value on the same form:

drop down name: sku
form : lookupproduct
form: product

I tried the following:

SELECT c_VariantPrice, c_VariantPrice
FROM aimsware.app_fd_products
WHERE c_VariantSku = #binder.product.Sku#

but It doesnt populate.... 

any hints on how to reference the value from the Sku dropdown in the query?



jdbc;clause;dropdown

5


15 Dec, 2019
confluenceUser
confluenceUser

Please Try to change column name without Prefix "c_" like this.


SELECT c_VariantPrice as VariantPrice , c_VariantPrice as VariantPrice
FROM aimsware.app_fd_products
WHERE c_VariantSku = #binder.product.Sku#


Hope this help.

16 Dec, 2019
confluenceUser
confluenceUser

Hi - I think the issue is with how I reference the field value in the where clause... I tried the query works when I have a value (WHERE c_VariantSku =  '100102956') ....


#binder.product.Sku#  is proper parameter to reference a value in the sku field of the form. keep in mind the data has not been saved to the database, so we can reference it by id....


thanks all


Tony 






16 Dec, 2019
confluenceUser
confluenceUser

Hi, perhaps you are missing single quotes around the hash variable, e.g. WHERE c_VariantSku = '#binder.product.Sku#'

17 Dec, 2019
confluenceUser
confluenceUser

Hi - Alas, I tried with and without the single quotes with no luck....

17 Dec, 2019
confluenceUser
confluenceUser

What exceptions do you get in the logs or console? Error messages should indicate what the actual problems are.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print