• Knowledge Base
  • Export Template Instructions for Database Builder with Postback URL

Extract specific values from Postback DBB Result text

On the Scans page choose to Create a Template.

1. Let’s assume you had three questions labelled as the following:

Name

Address

Gender

2. Drag (or click +) ‘Result’ from the ‘Static’ choices on the left to the ‘Columns’ for the template on the right.

3. Then click the Result field’s pencil icon and to choose ‘Custom‘ to modify the column using a pattern and replacement.

4. You will edit this regex and then enter it in the Pattern field. A good practice is to paste it in a text editor (e.g. Notepad or similar) and be sure there are no spaces.

^([\s\S]*)"label":"QUESTION_LABEL"([\s\S]*?),"value"(:":\[)([\s\S]*?)("}\]})([\s\S]*)$

5. You will enter this in the Replacement field.

$4

6. Use the clone icon next to the pencil to duplicate the Result column for as many fields as you want to collect. For this example, you would clone until I had 3 Result fields to match these 3 questions. You would also rename the header to Name, Address and Gender. 

7.  For each Result field, swap out QUESTION_LABEL with the one you want to be in that column (e.g. Name, Address or Gender). 

For example, here are the Name, Address and Gender patterns:

^([\s\S]*)"label":"Name"([\s\S]*?),"value"(:":\[)([\s\S]*?)("}\]})([\s\S]*)$
^([\s\S]*)"label":"Address"([\s\S]*?),"value"(:":\[)([\s\S]*?)("}\]})([\s\S]*)$
^([\s\S]*)"label":"Gender"([\s\S]*?),"value"(:":\[)([\s\S]*?)("}\]})([\s\S]*)$

In all three cases the replacement is:

$4

When you export or download your scan records be sure to select this template. Please email support@codeREADr.com if you need assistance.

in