on 05-23-2011 7:28 AM
Hi,
I want to compare the first character of a batch number in the expression editor of an action block and check if it is an alpha character.how to compare with all the 26 alpha characters.Is there any way to compare as we have in SQL as [A-Z].
e.g: if my batch number is F012345 or S012345,i want to exclude these. and if my batch number is 7012345 or 5012345,I want to include this.
Thanks in advance,
Sanjeev
Hi sanjeev,
I can suggest following solution:
take one local variable suppose x=F012345
than use stringleft and number function to verify first character is string or number.
Take first character of your batch number using string function.
stringleft(X,1)=F
Check wheather it is number or not by number function
number(stringleft(X,1))=0
but before number function you have to check stringleft(X,1) != 0
Than I think your logic will work.
Regards,
Manoj Bilthare
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
Thanks for your reply.
That logic is working but will be a bulky logic in my transaction as I am using a switch block with 11 inputs and hence I will have to give two additional conditional blocks for every case.
Anyways,if I do not get anything else,I will apply this only.
Thanks
Sanjeev
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.