Using a single query prompt for an "IN" statement.
I have a user who requests to be able to bulk print part labels based on a list copied and pasted from Excel. The list could be 100+ SKUs long so multiple query prompts won't suit his needs. I have tried using an IN statement in the query but can't get the prompt to work with multiple values. I have tried variations of the text formatting ('value1','value2','value3'...). Has anyone had any success putting a list into a single query prompt?
0
-
Hi,
There are multiple ways to address this, but the simplest and most effective approach would be as follows:
-
Using a Secondary Data Source:
- I assume your BarTender file already has a database connection to the complete list of SKUs.
- Since the user is copying the SKU data from Excel, you can create a separate text file or Excel file where they paste the data.
- In BarTender, add an additional database connection to this new file (the pasted data source). BarTender will prompt you to perform a multi-database join—select SKUs from both the main database and the pasted data file.
- Now, whenever the user overwrites the text file with the copied data from Excel and opens the BarTender document, it will automatically filter and print only the SKUs present in the pasted data. This seems to be the most straitforward way
-
Using BarTender Forms for a User-Driven Workflow:
- If you want the user to interact solely through BarTender, you can achieve this with BarTender Form Actions. However, this setup will require an additional BarTender file to act as a trigger.
- You will need a Named data source to hold the pasted data in the trigger file. Once that is set up on the form, you need to setup form actions
- The trigger file will use a Write File Action to update the text file connected to the main BarTender document and a Print Document Action to initiate the printing process. Configure these actions under the Form Closed event from the trigger file.
- I attempted to perform all actions within a single BarTender file which gave an infinite loop error, so using a separate trigger file prevents this issue.
- This trigger method worked too, I tested on around 10 codes/sku's, I'm pretty sure it should work for 100+ items too.
0 -
Please sign in to leave a comment.
Comments
1 comment