Query Prompt and Table Control - Dynamic/Scanned data to key Database Table Object
Hi All:
I'm using a table created from a custom SQL query reading table detail. I'd like to use a data entry form to dynamically scan the key data. Seems easy enough - but I can't figure out how to assign a query prompt or similar control to feed the table SQL.
Anyone have a similar issue? I've tried using template field data - but it seems like the DB table control calls the DB prior to the scan...and won't return data.
Thank you!
-
pthane
★ BarTender Hero ★
Sorry, I am not an SQL programmer, but I believe you will need to add something like this to your Custom SQL statement:
WHERE `ProductCode` = '?QueryPrompt1'
In the above ProductCode is the field I am searching for the parameter in for the paramater that is entered in QueryPrompt1 (you can give this a different name as long as it follows the same convention with the leading "?".
Once your query prompt has been defined then on your Data Entry Form you will be able to link to this Query Prompt.
I hope this helps
0 -
Robert Hayes
★ BarTender Hero ★
Thanks, Peter. This one is weird - the label prints fine when using the query prompt alone (no form) but won't populate both the header & table data when I switch to using a Data Entry form. Think the table control is calling the DB before the QP is set...
0 -
pthane
★ BarTender Hero ★
So you have a query prompt and then this populates a table with a number of records and then you choose one from there?
If so, you could try adding a 2nd Data Entry Form and add the table to that.
0 -
Utah Taylor
★ BarTender Hero ★
pthane what about if I have a table object connected to a query and I want that query to use a parameter (not linked to data entry)?
Is it true that the only way to use query parameters is to use data entry forms for table objects?
0 -
pthane
★ BarTender Hero ★
Do you mean something like adding a Filter/Query linked to a static field in the Database such as to a "Live Product" Y/N field?
0
Please sign in to leave a comment.
Comments
5 comments