on 09-27-2017 5:15 PM
Hello,
Could somebody explain me how to use multiple operators AND vs OR in this case:
Global StringVar Type ;
If UBound(myString)>=1
Then Type:= ToText(myString[1]);
Type := If Type = "F1A" Or Type = "F1E" Or Type = "F6A" Or Type = "F6E" Then "F";
Type := If Type = "G1A" Or Type = "G1E" Or Type = "G6A" Or Type = "G6E" Then "G";
Global StringVar Design ;
If UBound(myString)>=2
Then Design:= ToText(myString[2]);
Design := Replace (Design,"I","");
Design := If (Design = "20") and (Type = "F") Or (Design = "21") and (Type = "F") Or (Design = "22") and (Type = "F") Then "2" ;
Design
Hi Zdenek,
Please try:
Global StringVar Type ;
If UBound(myString)>=1
Then Type:= ToText(myString[1]);
Type := If Type IN ["F1A","F1E","F6A","F6E"] Then "F" Else If Type IN ["G1A","G1E","G6A","G6E"] Then "G";
Global StringVar Design ;
If UBound(myString)>=2
Then Design:= ToText(myString[2]);
Design := Replace (Design,"I","");
Design := If (Design = "20" and Type = "F") Or (Design = "21" and Type = "F") Or (Design = "22" and Type = "F") Then "2" ;
Design
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.