Check first character is it letter or number
Piece of advice is needed. I want to print out letter A if string in the data start with letter and letters AMG if the string starts with numbers.
Tried this but no success yet.
if left(value,1)="[A-Z]" then value="A"
if left(value,1)="[0-9]" then value="AMG"
if left(value,1)="[A]" then value="A" ,works when data is like A14768
br, Leksa
-
Peter Thane
★ BarTender Hero ★
You need to use the IsNumeric command I believe and have code like this
Value = Format.NamedSubStrings("theinput").Value
Value = left(Value,1)
Value2 = IsNumeric(Value)
Value = Value2
If Value2 = -1 then
Value = "AMG"
else Value = "A"
end if
Value = ValueDepending on when your data is being added to the label you may need to make this an EventControlled VB script routine and process it OnNewRecord if from a Database or OnPostPrompt if from a Data Entry Form etc
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
1 commentaire