How to print a different template based on the length of a data source
Is there a way to print different templates depending on the length of a data source?
I have a data source that can range from 000 to 000.123456789012 in length, but depending on how many digits are present in the data source I need to enter a carriage return at different points in the data.
I have created multiple templates to accommodate the different possible variations, but I am unsure how to get Bartender to only print certain templates depending on how many digits are present.
I tried "Print when Data source is like ???.???" etc similar to how character templates are used but this did not work.
Is there another way of figuring out the length of the data source and printing based on the outcome?
I am currently using Bartender Enterprise Automation 2016 R8 on a Windows 10 machine.
-
You could use the VB Len command to get the length of the field. If you include this command in a Named field (set via the top ringed option below) you can then reference this in the Print When.... settings in either the Page Setup for that template or via the Properties of template accessed via the bottom ringed option.
0 -
I kept trying to use the Len command but couldnt get it quite right, after seeing what you had done using a NamedDataSource did help me though!
I ended up with a NamedDataSource called Length, which found the length of my data source and then printed a template based on the value of Length.
Think I was trying to make it more complicated than it needed to be.
Thanks for the help!
0
Please sign in to leave a comment.
Comments
2 comments