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

How to extract specific values from Postback DBB Result text in an export template:

1. Assuming you had three questions labeled as the following:

Name and Address

Social Security Number

Male or Female

2. Drag Resultfrom the Static choicesto the Columns for the template

3. Click the pencilto modify the column using a patternand replacement

4. Enter this in the Patternfield

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

5. Enter this in the Replacementfield

$4

6. Use the cloneicon next to the pencilto duplicate the Result (response after each scan) column for as many fields as you want to collect. For this example I would clone until I had 3 Result boxes to match my 3 questions.

7. For each Result box, swap out QUESTION_LABEL with the one you want to be in that column (i.e. Name and Address):

^([\s\S]*)”label”:”Name and Address”([\s\S]*?),”value”(:”|:\[)([\s\S]*?)(“}|\]})([\s\S]*)$

^([\s\S]*)”label”:”Social Security Number”([\s\S]*?),”value”(:”|:\[)([\s\S]*?)(“}|\]})([\s\S]*)$

^([\s\S]*)”label”:”Male or Female”([\s\S]*?),”value”(:”|:\[)([\s\S]*?)(“}|\]})([\s\S]*)$

8. Here’s another example using this Result’s formatted response:

[

{“id”:491594,”label”:”Name and Address”,”type”:”text”,”value”:”John Doe\n214 Lincoln St. 02134″},

{“id”:483245,”label”:”Check In or Out”,”type”:”text”,”value”:”IN”},

{“id”:233999,”label”:”Colors”,”type”:”list”,”value”:[“Red”,”Green”]}

]

If I wanted the name and address I would use pattern

^([\s\S]*)”label”:”Name and Address”([\s\S]*?),”value”(:”|:\[)([\s\S]*?)(“}|\]})([\s\S]*)$

and replacement is still

$4

 

in