(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PF5R8F7');

Knowledge Base

View Categories

Creating Export Templates

48 min read

Export Template Instructions

Export Templates are an important feature for viewing, filtering, exporting, inserting, and sharing your scan records. Also, you can select which criteria your scan records are filtered by, and what details appear when you export scans. To get to your Export Templates, visit the Scans page and select the Export Templates tab.

Export templates

Then, select ‘Create a Template’ and you’ll see this screen. On this page, you’ll be able to select the different values and questions you want to be displayed in the exports of the scan records. Also, you can select the order that they appear in the report. The values appear in descending order. Thus, the first value at the top will appear first.

Drag and drop columns

Also, you can select Questions specific to a service. This allows you to make sure that the questions you select are actually the questions you want to display. For instance, you may have two questions, both named ‘Check In’. However, if you filter questions available by service and select your service ‘Attendance’, only one of those ‘Check In’ questions would be available. Thus, make sure the correct question is displayed by checking which service it belongs to.

Moreover, you can rename the column headers to match your destination document/sheet. First, select ‘Edit’ on the values in the columns for the Template. Also, you can clone the values using the ‘Copy’ button. This is useful for showing multiple answers for a question in different columns, or if you need to repeat data.

For advanced users, you can use a regular expression to parse structured data. This is covered below.

Export template steps

Create ‘placeholder’ columns in the template. Drag and drop ‘Custom Value’ from the Static Choices column to the template column and then name it. You can optionally auto-fill all records with the same value by adding that value here.

Create a place holder

Special Fields

export template operation

For certain questions or scan properties, there are special options for their specific data.

This can be seen under the dropdown menu for the GPS Location property. The data collected can be output in several formats, giving the option for an Address (if recorded), GPS coordinates, specifically the latitude, longitude, as well as others. Learn more about Barcode GPS Location Tracking here.

This can also be seen in the image below for photos collected using our Photo Collection feature through barcode scanning. The options for a link to the photo include both the URL as well as the file name.

export template operation

Regular Expression

Regex columns for a template

Regular Expressions (regex) can break up raw data embedded together in a barcode (or in the response text) into individual fields. It is commonly used for VCARD parsing. Here are some examples.

Barcode including line feeds to parse into different lines:

Barcode template instructions

Pattern:

^([\s\S]*?)\r\n([\s\S]*?)\r\n([\s\S]*?)\r\n([\s\S]*?)\r\n([\s\S]*?)\r\n([\s\S]*?)$

Replacement:

$1 for Name

$2 for Occupation

$3 for Company

$4 for Location

$5 for Phone Number

$6 for Email

Result:

In each column:

John Doe

Engineer

Design Inc.

Cupertino, CA

1-800-555-1212

john@email.com

Notice the pattern begins with the ^ symbol and ends with the $ symbol. Also notice the ([\s\S]*?) pattern repeats six times for six elements. And (important) the \r\n repeats 5 times. You need to clone six times for six elements, each using the SAME pattern but with a different replacement ($1, $2, etc.).

Barcode including five 5 bar ‘|’ separators for 6 elements:

Pattern:

^([\s\S]*)\|([\s\S]*)\|([\s\S]*)\|([\s\S]*)\|([\s\S]*)\|([\s\S]*)$

Replacement:

$1 for Name

$2 for Occupation

$3 for Company

$4 for Location

$5 for Phone Number

$6 for Email

Input:

John Doe|Engineer|Design Inc.|Cupertino, CA|1-800-555-1212|john@email.com

Result:

In each column:

John Doe

Engineer

Design Inc.

Cupertino, CA

1-800-555-1212

john@email.com

Notice the pattern begins with the ^ symbol and ends with the $ symbol. Also notice the ([\s\S]*?) pattern repeats six times for six elements. And (important) the \| symbols repeat 5 times. As with the line feed (\r\n) example, you need to clone six times for six elements, each using the SAME pattern but with a different replacement ($1, $2, etc.).

Barcode including five space separators for six elements:

Pattern:

^([\s\S]*)\s([\s\S]*)\s([\s\S]*)\s([\s\S]*)\s([\s\S]*)\s([\s\S]*)$

Replacement:

$1 for Name

$2 for Occupation

$3 for Company

$4 for Location

$5 for Phone Number

$6 for Email

Input:

John Doe Engineer Design Inc. Cupertino, CA 1-800-555-1212 john@email.com

Result:

In each column:

John Doe

Engineer

DesignInc.

Cupertino,CA

1-800-555-1212

john@email.com

Barcode including five tab separators for six elements:

Pattern:

^([\s\S]*)\t([\s\S]*)\t([\s\S]*)\t([\s\S]*)\t([\s\S]*)\t([\s\S]*)$

Replacement:

$1 for Name

$2 for Occupation

$3 for Company

$4 for Location

$5 for Phone Number

$6 for Email

Input:

John Doe     Engineer      Design Inc.      Cupertino, CA     1-800-555-1212     john@email.com

Result:

In each column:

John Doe

Engineer

Design Inc.

Cupertino, CA

1-800-555-1212

john@email.com

Cloning fields and ordering elements based on element patterns:

When using Batch Mode, for example, multiple barcodes are captured within a single field. If you need those barcodes to be presented in a certain order, regex can do that for you providing there’s a way to differentiate the barcodes values scanned.  Please look here for an example regex for Batch Mode order.

Clone and parse elements in one field:

Pattern:

^([\s\S]*?)\|\|([\s\S]*?)\|\|([\s\S]*?)\|\|([\s\S]*?)\|\|([\s\S]*?)\|\|([\s\S]*?)$

Replacement:

$1 for Name

$2 for Occupation

$3 for Company

$4 for Location

$5 for Phone Number

$6 for Email

Input:

John Doe||Engineer||Design Inc.||Cupertino, CA||1-800-555-1212||john@email.com

Result:

In each column:

John Doe

Engineer

Design Inc.

Cupertino, CA

1-800-555-1212

john@email.com

VCARD barcode parsing:

The parsing of VCARD data is similar to the above except you will need to parse each field based on the field’s description. Please look here for VCARD Parsing Regex for Barcode Scanner.

Batch Scanning:

The CodeREADr app can quickly scan up to 500 barcodes in a single camera view. Here’s a blog article discussing batch scanning.

Parsing into Rows

When batch scans are exported, they will all appear in a single cell. Parsing each barcode into a separate row can currently only be done after the scan records have been exported. Contact support@codereadr.com for information on how to do that with Excel and Sheets.

Parsing into Columns

You can create separate columns when using an export template. You would clone the barcode field into separate columns and use the custom option to enter the regex based on the separator chosen for your batch scan.

Also, if select barcodes can be differentiated from the other barcodes recorded, a regex can be written to have them appear in specified columns. This PDF shows how to separate batch scans into separate columns.

Alternatively, especially if you have a lot of scans in one cell, here’s a PDF showing how to parse in Excel.