Check Number Of Characters In A Field
Hi
Fairly new to Bartender and have version 10.1.
I have a field that displays the colour eg. Purple, Blue, Palatinate Purple. I need the font size adjusted based on the number of characters in the field. So if less than 16 characters use font size 16 but if more than or equal to 16 then use font size 14.
My question is how to I test the number of characters? is there a built in reference?
Or is it better to use the auto adjust and therefore not test the number of characters?
Thanks in advance for your help.
Nicky
-
I would say it's easier to use the auto-adjust text if it works for you. Otherwise, the VB command for seeing the length of a sting is "len()"
For example, you would first give the data source a share name like "Color". Then you would write your vb script out like
if (len(Color) < 16) then DO SOMETHING else DO SOMETHING end if
0
Please sign in to leave a comment.
Comments
1 comment