Transforming a Query Prompt with Visual Basic
I'm scanning a barcode into a query prompt of a dynamic filter to print a bunch of related information from a data table on the label. Problem is that the barcode needs more string manipulation than the preset transform selections available in the dialog can handle so I'd like to use the VB scripting option. I just can't figure out how to refer to the prompt text within the VB script to be able to work with it. It's not in the script assistant and I've not been able to figure it out (trying versions of namedtext, form, etc. objects). Help?
-
pthane
★ BarTender Hero ★
You should be able to achieve this from here in the Filter/Query Prompt setup
In the image below I have set the VB just to keep the right three characters to perform the database look up with a simple Value = Right(Value,3) command in the script box
0 -
Karen Holland
★ BarTender Hero ★
Yes, that's the feature I'm trying to use. Once inside the editor, how do I refer to string that is the Query Prompt input? I've been looking but what type of object is a query prompt? "Format.Objects("ScanBCPrompt").Value" (where "ScanBCPrompt" is the query prompt name) gives an error that the "ScanBCPrompt" object is not found. I've tried a couple other Bartender object types (namedsubstrings, etc.) to access the prompt's content but get errors that they don't exist. Simply using "value" (as your example) also doesn't work.
0 -
Karen Holland
★ BarTender Hero ★
I got it working now. Not sure what was wrong but simply using "Value" is working now. Thank you!
0
Please sign in to leave a comment.
Comments
3 comments