AnsweredAssumed Answered

Card Reader, Reading a Drivers Liscense Script

Question asked by WilliamSouth on Mar 28, 2015
Latest reply on Mar 28, 2015 by philmodjunk

Title

Card Reader, Reading a Drivers Liscense Script

Post

I have been trying to make set field script that deciphers all information that the card reader gets off a drivers license. My script work for  some drivers licenses, but I am realizing that not all of the code on the drivers licenses are made exactly the same for example (information has been altered so I am not giving anyones info)

DRIVER INFO  FROM CARD READER  (WORKS CORRECTLY)

EXAMPLE A

%3%FLSUNRISE^SMITH$BOB$JOHN^8888 NW 777TH ST?;6360101912121212121=2009197899130=?+! 33333  E               1508                                   ECCECC00000?3322  E               1508                                   ECCECC00000?

FIRST NAME= LeftWords(Substitute(Middle ( Customer::FULL LICENSE_G; Position ( Customer::FULL LICENSE_G ; "$" ; 1 ; 1 ) + 1 ; Position ( Customer::FULL LICENSE_G; "^" ; 30 ; 1)- Position ( Customer::FULL LICENSE_G; "$" ; 1 ;1 ) -1  );"$";" ");1)

LAST NAME =Middle ( Customer::FULL LICENSE_G ; Position ( Customer::FULL LICENSE_G ; "^" ; 1 ; 1 ) + 1; Position ( Customer::FULL LICENSE_G ; "$"; 1 ; 1 ) - Position ( Customer::FULL LICENSE_G; "^" ; 1 ; 1 ) - 1 )

ADDRESS= Substitute (Middle ( Customer::FULL LICENSE_G; Position ( Customer::FULL LICENSE_G; "^" ; 1 ; 2 ) + 1 ; Position ( Customer::FULL LICENSE_G; "?" ; 30 ; 1)- Position ( Customer::FULL LICENSE_G ; "^" ; 1 ;2 ) -1  );"^";"")

CITY=Right(Middle ( Customer::FULL LICENSE_G; Position ( Customer::FULL LICENSE_G ; "%" ; 1 ; 1 ) + 1 ; Position ( Customer::FULL LICENSE_G; "^" ; 1 ; 1)- Position ( Customer::FULL LICENSE_G ; "%" ; 1 ;1 ) -1  );Length(Middle ( Customer::FULL LICENSE_G; Position ( Customer::FULL LICENSE_G ; "%" ; 1 ; 1 ) + 1 ; Position ( Customer::FULL LICENSE_G; "^" ; 1 ; 1)- Position ( Customer::FULL LICENSE_G ; "%" ; 1 ;1 ) -1  ))-2)

STATE=Left(Middle ( Customer::FULL LICENSE_G; Position ( Customer::FULL LICENSE_G ; "%" ; 1 ; 1 ) + 1 ; Position ( Customer::FULL LICENSE_G; "^" ; 1 ; 1)- Position ( Customer::FULL LICENSE_G ; "%" ; 1 ;1 ) -1  );2)

ZIP=Substitute(Middle ( Customer::FULL LICENSE_G; Position ( Customer::FULL LICENSE_G ; "!" ; 1 ; 1 ) +2 ; Position ( Customer::FULL LICENSE_G; "E" ;1 ; 1) -3- Position ( Customer::FULL LICENSE_G ; "!" ; 1 ; 2 ) -1);"E";"")

DRIVER LICENSE =Left(Customer::LastName;1)&Right(Middle ( Customer::FULL LICENSE_G; Position ( Customer::FULL LICENSE_G ; ";" ; 1 ; 1 ) +1 ; Position ( Customer::FULL LICENSE_G; "=" ;1 ; 1) - Position ( Customer::FULL LICENSE_G ; ";" ; 1 ; 1 ) -1);11)

 

BELOW IS A SWIPE OF ANOTHER CARD BUT THE ABOVE CALC, (DOSE NOT WORK CORRECTLY)EXAMPLE B

%FLFORT LAUDERDAO\OCCONOR$JOHN$JIMMY^1111 ONE WAY MANOR DR^                ?;6360101533333333333=1804199099120=?+! 33322  E               1511                                   ECCECC00000?

Outcomes