02-04-2021 09:32 PM
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
02-05-2021 08:32 AM
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.
02-05-2021 08:32 AM
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.
02-17-2021 07:53 PM
Thanks Steve, I will give it a go.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.