Filter Metadata

Hi everone,

I use the Barcode Scan Plugin in a Workflow to find all Datamatrix barcodes on the document. In a next step I would like to delete (or filter out) all BarcodeValues starting with DEA. I tried some rules but it seems I don’t know what I am doing…

Here a sample result from a Barcode Scan.

Kind regards,
Tobias

Hi @Tobias,

Could you please tell us what you mean by “I tried some rules […]”?

Sorry @Marten,

for example:
I added a metadata filter as the next step to filter out all BarcodeValue (last three entries in the screenshot above) that start with ‘DEA’. In the metadata filter I added the rule “(GetMeta(BarcodeValue[?], 10, Job.Group[0].Document[0].Datapage[0]) Does not start with DEA)” to the Datapage.

Don’t worry, thank you for sharing an example.

Could you please test the following properties?

with “(_vger_fld_BarcodeValue Does not start with DEA)” on the document level the metadata looks still the same after the filter step.

@Marten Could you please elaborate on why this should work?

As I understand it “Barcode Scan” finds three barcodes in the image. Therefore there are three BarcodeValue on the datapage-level.

I can set a jobinfo value to the first barcode with GetMeta(BarcodeValue[0], 10, Job.Group[0].Document[0].Datapage[0]). But i cannot get rid of the DEA barcodes by using a similar syntax on the datapage-level?

i still don’t understand the metadata filter rules but solved my problem with a small script. if anyone wants to do something similar in the future:

var bCounter = Watch.ExpandString(“GetMeta(BarcodeCount[0],10,Job.Group[0].Document[0].Datapage[0])”);
var bGoodCounter = 1;
for (var i = 0; i < bCounter; i++) {
var tempBarcode = Watch.ExpandString(“GetMeta(BarcodeValue[” + i.toString() + “], 10, Job.Group[0].Document[0].Datapage[0])”);
if (tempBarcode && !tempBarcode.startsWith(‘DEA’)) {
Watch.SetJobInfo(bGoodCounter, tempBarcode);
bGoodCounter++;
}
}

Hi @Tobias,

I am glad to hear that you have been able to solve your question by using a script. I assume that you will have to solve your question by making use of a script indeed. Using the properties as shown in the shared screenshot will only filter the metadata when the first “BarcodeValue” Metadata field does not start with “DEA”.