Print Field Conditionally On Value Of Another Field
On a label I am designing, there is a field that should only print if one of the other fields has a value. If "field2" is blank, I want "field1" to print. If "field2" has a value, I want "field1" to be invisible. Is this something I can do with a VB script? It seems so simple, yet I can't get it to work. I am using Embedded data fields passed to Bartender in a btxml file.
Thanks for any help!
-
Yes you can do this one way or another. First though, how are field 1 and 2 getting their data? From a data entry form, database field, other??
0 -
Bartender Commander is getting a .btxml file with all of the fields. The fields in the label design are Embedded Data. Does that help? Here's the VB Script I tried, but I know almost nothing about VB Script so it was a shot in the dark....
IIF Format.NamedSubStrings("@ProdOrderComments").Value = "",Format.NamedSubStrings("@PRDNumber").Value = Format.NamedSubStrings("@PRDNumber").Value,Format.NamedSubStrings("@PRDNumber").Value = ""
0 -
What version/build of BarTender is this exactly?
So I suppose that your setting data source values directly from XML using the NamedSubString tag?
You could use the document level VB scripting to do what you want. Find this via the "File>Document Options" menu item, select the "VB Scripting" tab and then enter in something like the below code for an appropriate event.
If Format.NamedSubStrings("Field1").Value = "" Then Format.Objects("Text 1").PrintVisibility = True Format.Objects("Text 2").PrintVisibility = False else Format.Objects("Text 1").PrintVisibility = False Format.Objects("Text 2").PrintVisibility = True End IfThis white paper should also be useful to you:
0
Please sign in to leave a comment.
Comments
3 comments