cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
432
Views
0
Helpful
2
Replies

Need Script Help w/String Compare

ronupcdef
Level 1
Level 1

I am a basic script writer and have not needed to use Java. I now have a need to find strings that are six characters (digits) long and begin with a "1". Using if VAR == "1....." doesn't work. Does anyone have a simple solution for this simple string compare? Do I need to use Java? Example please?

2 Replies 2

ronupcdef
Level 1
Level 1

Found it! String methods under the If Step:

If String.StartsWith("1")

Yep.

You can check length with the .Length(6) value.

((variable.StartsWith("1")) && (variable.Length(6)))

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: