05-13-2021 19:20 PM
This app shows you how to extract data from a drivers license barcode. There is an incredible amount of data in every drivers license; being able to collect it has many purposes. From HR on-boarding to event registration and check in, the possibilities are nearly endless.
There isn't a lot to this app. Each value has it's own Match() function to build the data collection. In the example below you can see that the abbreviation "DAA" matches the "Full Name" value, so I use a regular expression to find that value and add it to the collection.
{Value: First(Match(LicenseData,"\n" & "DAA" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Full Name" },
Special thanks to this post that had the abbreviations for all the data explained.
https://blog.dynamsoft.com/imaging/extract-data-pdf417-driver-licenses/
Download the app, scan your license (or the sample license barcode attached) and let me know some use cases you can think of!
Thank you!
Eric
@Anonymous Great stuff here! Not sure how rough it was to develop this, going back and forth from phone to computer and all that, but I appreciate that you did! I'm implementing this to help with data entry on new hires. Basically makes it a scan and a few more clicks to get them in our system!
Thanks for sharing your awesome work!
@EricLott that was just what I needed, and thanks SO much for sharing the app. Saved me all that legwork, really appricate the great work!
I couldn't figure out how to import the files. I stuck them in a zip file but it didn't work.
@Anonymous @I tried to click the link to view the app you created for the license scanned but I was not able to view it after downloading it. Is there a link you can share with me so that I can view the app in power apps? I’m working to try to create a license scanner in power apps currently and think it would be beneficial to see how you utilized the Match function to add the data to your collection/sharepoint lists. Thanks!
@wyotim it sounds like you may have been successful at creating a power app for your new hires - great news! Were you able to use the match functions listed in this thread to store the data in your collection. I’m currently working to try to figure out how to store the data into a sharepoint list columns after it is scanned and want to figure out how to use the match function to auto-fill fields in the app after scanned. Any suggestions?
You'll need to download the .msapp and import it into your environment. You can then open or edit it.
The example Match() function included here is part of a big ugly formula that looks like this
Set(LicenseData,LicenseScanner.Value);
ClearCollect(driverLicenseFields,Table(
{Value: First(Match(LicenseData,"\n" & "DAA" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Full Name" },
{Value: First(Match(LicenseData,"\n" & "DAB" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Last Name" },
{Value: First(Match(LicenseData,"\n" & "DAB" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Family Name" },
{Value: First(Match(LicenseData,"\n" & "DAC" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "First Name" },
{Value: First(Match(LicenseData,"\n" & "DAC" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Given Name" },
{Value: First(Match(LicenseData,"\n" & "DAD" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Middle Name or Initial" },
{Value: First(Match(LicenseData,"\n" & "DAD" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Middle Name" },
{Value: First(Match(LicenseData,"\n" & "DAE" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Name Suffix" },
{Value: First(Match(LicenseData,"\n" & "DAF" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Name Prefix" },
{Value: First(Match(LicenseData,"\n" & "DAG" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Mailing Street Address1" },
{Value: First(Match(LicenseData,"\n" & "DAH" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Mailing Street Address2" },
{Value: First(Match(LicenseData,"\n" & "DAI" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Mailing City" },
{Value: First(Match(LicenseData,"\n" & "DAJ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Mailing Jurisdiction Code" },
{Value: First(Match(LicenseData,"\n" & "DAK" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Mailing Postal Code" },
{Value: First(Match(LicenseData,"\n" & "DAL" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Residence Street Address1" },
{Value: First(Match(LicenseData,"\n" & "DAM" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Residence Street Address2" },
{Value: First(Match(LicenseData,"\n" & "DAN" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Residence City" },
{Value: First(Match(LicenseData,"\n" & "DAO" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Residence Jurisdiction Code" },
{Value: First(Match(LicenseData,"\n" & "DAP" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Residence Postal Code" },
{Value: First(Match(LicenseData,"\n" & "DAQ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "License or ID Number" },
{Value: First(Match(LicenseData,"\n" & "DAR" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "License Classification Code" },
{Value: First(Match(LicenseData,"\n" & "DAS" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "License Restriction Code" },
{Value: First(Match(LicenseData,"\n" & "DAT" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "License Endorsements Code" },
{Value: First(Match(LicenseData,"\n" & "DAU" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Height in FT_IN" },
{Value: First(Match(LicenseData,"\n" & "DAV" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Height in CM" },
{Value: First(Match(LicenseData,"\n" & "DAW" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Weight in LBS" },
{Value: First(Match(LicenseData,"\n" & "DAX" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Weight in KG" },
{Value: First(Match(LicenseData,"\n" & "DAY" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Eye Color" },
{Value: First(Match(LicenseData,"\n" & "DAZ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Hair Color" },
{Value: First(Match(LicenseData,"\n" & "DBA" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "License Expiration Date" },
{Value: First(Match(LicenseData,"\n" & "DBB" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Date of Birth" },
{Value: First(Match(LicenseData,"\n" & "DBC" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Sex" },
{Value: First(Match(LicenseData,"\n" & "DBD" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "License or ID Document Issue Date" },
{Value: First(Match(LicenseData,"\n" & "DBE" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Issue Timestamp" },
{Value: First(Match(LicenseData,"\n" & "DBF" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Number of Duplicates" },
{Value: First(Match(LicenseData,"\n" & "DBG" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Medical Indicator Codes" },
{Value: First(Match(LicenseData,"\n" & "DBH" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Organ Donor" },
{Value: First(Match(LicenseData,"\n" & "DBI" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Non-Resident Indicator" },
{Value: First(Match(LicenseData,"\n" & "DBJ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Unique Customer Identifier" },
{Value: First(Match(LicenseData,"\n" & "DBK" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Social Security Number" },
{Value: First(Match(LicenseData,"\n" & "DBL" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Date Of Birth" },
{Value: First(Match(LicenseData,"\n" & "DBM" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Social Security Number" },
{Value: First(Match(LicenseData,"\n" & "DBN" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Full Name" },
{Value: First(Match(LicenseData,"\n" & "DBO" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Last Name" },
{Value: First(Match(LicenseData,"\n" & "DBO" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Family Name" },
{Value: First(Match(LicenseData,"\n" & "DBP" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "First Name" },
{Value: First(Match(LicenseData,"\n" & "DBP" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Given Name" },
{Value: First(Match(LicenseData,"\n" & "DBQ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Middle Name" },
{Value: First(Match(LicenseData,"\n" & "DBQ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Middle Name or Initial" },
{Value: First(Match(LicenseData,"\n" & "DBR" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Suffix" },
{Value: First(Match(LicenseData,"\n" & "DBS" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Prefix" },
{Value: First(Match(LicenseData,"\n" & "DCA" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Virginia Specific Class" },
{Value: First(Match(LicenseData,"\n" & "DCB" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Virginia Specific Restrictions" },
{Value: First(Match(LicenseData,"\n" & "DCD" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Virginia Specific Endorsements" },
{Value: First(Match(LicenseData,"\n" & "DCE" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Physical Description Weight Range" },
{Value: First(Match(LicenseData,"\n" & "DCF" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Document Discriminator" },
{Value: First(Match(LicenseData,"\n" & "DCG" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Country territory of issuance" },
{Value: First(Match(LicenseData,"\n" & "DCH" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Federal Commercial Vehicle Codes" },
{Value: First(Match(LicenseData,"\n" & "DCI" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Place of birth" },
{Value: First(Match(LicenseData,"\n" & "DCJ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Audit information" },
{Value: First(Match(LicenseData,"\n" & "DCK" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Inventory Control Number" },
{Value: First(Match(LicenseData,"\n" & "DCL" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Race Ethnicity" },
{Value: First(Match(LicenseData,"\n" & "DCM" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Standard vehicle classification" },
{Value: First(Match(LicenseData,"\n" & "DCN" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Standard endorsement code" },
{Value: First(Match(LicenseData,"\n" & "DCO" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Standard restriction code" },
{Value: First(Match(LicenseData,"\n" & "DCP" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Jurisdiction specific vehicle classification description" },
{Value: First(Match(LicenseData,"\n" & "DCQ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Jurisdiction-specific" },
{Value: First(Match(LicenseData,"\n" & "DCR" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Jurisdiction specific restriction code description" },
{Value: First(Match(LicenseData,"\n" & "DCS" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Family Name" },
{Value: First(Match(LicenseData,"\n" & "DCS" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Last Name" },
{Value: First(Match(LicenseData,"\n" & "DCT" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Given Name" },
{Value: First(Match(LicenseData,"\n" & "DCT" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "First Name" },
{Value: First(Match(LicenseData,"\n" & "DCU" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Suffix" },
{Value: First(Match(LicenseData,"\n" & "DDA" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Compliance Type" },
{Value: First(Match(LicenseData,"\n" & "DDB" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Card Revision Date" },
{Value: First(Match(LicenseData,"\n" & "DDC" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "HazMat Endorsement Expiry Date" },
{Value: First(Match(LicenseData,"\n" & "DDD" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Limited Duration Document Indicator" },
{Value: First(Match(LicenseData,"\n" & "DDE" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Family Name Truncation" },
{Value: First(Match(LicenseData,"\n" & "DDF" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "First Names Truncation" },
{Value: First(Match(LicenseData,"\n" & "DDG" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Middle Names Truncation" },
{Value: First(Match(LicenseData,"\n" & "DDH" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Under 18 Until" },
{Value: First(Match(LicenseData,"\n" & "DDI" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Under 19 Until" },
{Value: First(Match(LicenseData,"\n" & "DDJ" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Under 21 Until" },
{Value: First(Match(LicenseData,"\n" & "DDK" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Organ Donor Indicator" },
{Value: First(Match(LicenseData,"\n" & "DDL" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Veteran Indicator" },
{Value: First(Match(LicenseData,"\n" & "PAA" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Permit Classification Code" },
{Value: First(Match(LicenseData,"\n" & "PAB" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Permit Expiration Date" },
{Value: First(Match(LicenseData,"\n" & "PAC" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Permit Identifier" },
{Value: First(Match(LicenseData,"\n" & "PAD" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Permit IssueDate" },
{Value: First(Match(LicenseData,"\n" & "PAE" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Permit Restriction Code" },
{Value: First(Match(LicenseData,"\n" & "PAF" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Permit Endorsement Code" },
{Value: First(Match(LicenseData,"\n" & "ZVA" & "(.+)\n",MatchOptions.Contains).SubMatches), Description: "Court Restriction Code" }
))
Sounds great. Thanks for responding back!!