'add' Function Follow
Hi Team Seagull,
it's again time for a question and i'm sure you will be able to help me!
I have this vbscript on a field in Bartender 9.4.
Value = Value + Format.NamedSubStrings("expirationplus").Value
Value is something like 1Q12 which comes from the data entry dialogue. I have set Truncation to discard 2 characters on left.
So value is 12
'expirationplus' is the name of a database field (text file) where i get a number that is either 5,12 or 20.
So what i want to have is that the Value is e.g. 12 + 20 = 32
What happen is that i get 1220. So it's no addition but concentation.
So wat i tried is this:
Value = CDbl(Value) + Format.NamedSubStrings("expirationplus").Value
This works in the script assistant, there i'm getthing now the expected value of 32.
But when printing the label i'm getting this error message:
Error Message #3907
OnProcessData (Line1): : incompatible data types 'CDbl'
(I have translated the "incompatible data types" error from german to english. Although Bartender is setup in english, this part of the error was in german, obviously taken from the operating systems language. So i'm not 100% sure about the exact message)
Well it doesn't matter if i try with singe or double or whatsoever. It works in the Script Assistant but not when printing.
So how can i actually add and not concentate these two numbers?
Fernando Ramos MiracleModerator
Please sign in to leave a comment.