cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Capture - Second Capture Group Keyword Type when a value is in the second/following row

Damian_Grabowsk
Star Contributor
Star Contributor

Hello,

 

Consider the following invoice layout:

 

               Item Code/Description                                          QTY                    Price                    Total 

Row 1:    XXX0001                                                                       1                        500                        500

Row 2:    Advanced Capture license

 

Row 1:    XXX0002                                                                       1                        400                        400

Row 2:    Data Capture Server license

 

From the aforementioned invoice, I would like to extract both "Item Code" from Row 1 and "Description" from Row 2.

I was thinking about using the "Second Capture Group Keyword Type " option, but with no success. Does anyone have a similar case and succeeded?

 

Regards,

Damian

1 ACCEPTED ANSWER

Steve_Reed
Employee
Employee

Hi Damian,

 

The 'second capture group keyword' won't work in this situation, it is meant for splitting two values that appear on the same line (presumably immediately next to each other, horizontally).  But you could use the 'continued-row merging' feature, which would tell the engine to detect that the second line is a continuation of the previous line...and then it would merge together the item code value and the description into a single keyword instance together, so whatever keyword type you have set for the item code, after the row is merged, would end up with this value concatenated:

 

Item Code keyword = "XXX0001 Advanced Capture license"

 

So after the processing is complete, you could use a post-processing script in advanced capture (i.e. the form complete hook), or a custom process script in a queue immediately following advanced capture, or even a Workflow action (if you're using Workflow later on in the process) to cycle through all of these MIKG rows, and then split the values back into separate keywords (I presume that the item code is somewhat identifiable with a regular expression, or maybe it has no spaces in it, so you can split on the space character added during the concatenation of the two rows, etc.).   If you wanted to go this route, you'd just have to make sure that the item code keyword type is configured to be long enough to support the concatenated value since both values will [temporarily] be stored together in this keyword type.

View answer in original post

2 REPLIES 2

Steve_Reed
Employee
Employee

Hi Damian,

 

The 'second capture group keyword' won't work in this situation, it is meant for splitting two values that appear on the same line (presumably immediately next to each other, horizontally).  But you could use the 'continued-row merging' feature, which would tell the engine to detect that the second line is a continuation of the previous line...and then it would merge together the item code value and the description into a single keyword instance together, so whatever keyword type you have set for the item code, after the row is merged, would end up with this value concatenated:

 

Item Code keyword = "XXX0001 Advanced Capture license"

 

So after the processing is complete, you could use a post-processing script in advanced capture (i.e. the form complete hook), or a custom process script in a queue immediately following advanced capture, or even a Workflow action (if you're using Workflow later on in the process) to cycle through all of these MIKG rows, and then split the values back into separate keywords (I presume that the item code is somewhat identifiable with a regular expression, or maybe it has no spaces in it, so you can split on the space character added during the concatenation of the two rows, etc.).   If you wanted to go this route, you'd just have to make sure that the item code keyword type is configured to be long enough to support the concatenated value since both values will [temporarily] be stored together in this keyword type.

Thanks Steve, I will give it a go.