stuhanna Posted November 11, 2008 Posted November 11, 2008 I'm trying to pass the cc type to a field based on the first character of the card # which is swiped into a temporary global field. If the first character begins with "3" it equals amex, 4 = Visa, 5=MC and 6=Discover. Can you help with the scripting - especially to find the first character. Thhanks in advance.
Raybaudi Posted November 12, 2008 Posted November 12, 2008 Isn't this good for you ? Case( Left ( card # ; 1 ) = 3 ; "Amex" ; Left ( card # ; 1 ) = 4 ; "Visa" ; Left ( card # ; 1 ) = 5 ; "MC" ; Left ( card # ; 1 ) = 6 ; "Discover" ) Another way can be: Choose ( Left ( card # ; 1 ) - 3 ; "Amex" ; "Visa" ; "MC" ; "Discover" )
stuhanna Posted November 12, 2008 Author Posted November 12, 2008 This looks great and is very helpful. I'll give it a whirl and let you know. Thanks!
stuhanna Posted November 13, 2008 Author Posted November 13, 2008 [color:blue]Thanks...that was the trick!
Recommended Posts
This topic is 5856 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now