Topic Options
#57839 - 01/05/21 08:04 AM Text Condition on a Variable
dvbsf Offline
OL Newbie

Registered: 01/07/20
Posts: 12
Loc: Florida
I have a process that scans the barcode of incoming documents. The barcodes changes with each document and there can be several in the packet.

I have several text conditions but the first one I am struggling with. I need it to detect that a barcode exists on the page, if no barcode is detected then it moves to the top of the process and proceeds to the next page.

The barcodes is 6 numerical digits with a 2 digit letter identifier at the end.

I've tried a few different variations on the text condition but nothing so far actually detects the different between no value and a value.


Current settings:
Job Information and Variables Set - %1 is the current barcode for the page being processed.

Text Condition:
String : %1
Operator: is found
Location : on the page

Results from debug:
1 - No barcode on the given page
JobInfo/Variable %1 is set to ""
Plugin Set Job Infos and Variables completed successfully

Starting plugin Text Condition
String %1
Parsed String
Search String "" on page
Condition Result is false ...

2 - Barcode detected
JobInfo/Variable %1 is set to "9024326FR"
Plugin Set Job Infos and Variables completed successfully

Starting plugin Text Condition
String %1
Parsed String 9024326FR
Search String "9024326FR" on page
Condition Result is false ...

Does anyone have any suggestions on what to use for a text condition?

Top
#57840 - 01/05/21 08:34 AM Re: Text Condition on a Variable [Re: dvbsf]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 650
Loc: Québec, Canada
If what you an is to know if a page has barcode or not, simply set your Text condition to look for the BarcodeCounttag of the metadata generated by the Barcode Scan plugin. If no barcode are found, its value will be 0.

Now if your use the barcoded plugin Process by option by page, the plugin will act as a loop, for each page.

If by file then it becomes tricky as you have to check on each page. I suggest the former.


Edited by Jean-Cédric (01/05/21 08:35 AM)
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#57841 - 01/05/21 12:08 PM Re: Text Condition on a Variable [Re: dvbsf]
dvbsf Offline
OL Newbie

Registered: 01/07/20
Posts: 12
Loc: Florida
I must be still doing something wrong.
I set BarcodeCount - which returns a 1 on a page with a barcode and 0 on a page without.

Operator - is equal to
compare to string 1
Condition Result is False

Operator - is greater than
compare to string 0
Condition Result is False

I will submit a ticket. Thank you for trying

Top
#57842 - 01/05/21 12:56 PM Re: Text Condition on a Variable [Re: dvbsf]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 650
Loc: Québec, Canada
Did you check the Numeric comparison check box in the Text Condition plugin?
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#57843 - 01/05/21 01:25 PM Re: Text Condition on a Variable [Re: dvbsf]
dvbsf Offline
OL Newbie

Registered: 01/07/20
Posts: 12
Loc: Florida
When I use the Numeric comparison I get the error message that it's not a valid integer; using default answer
Condition False

String: Get Meta(BarcodeCount(0), 10, Job.Group(0).document[2].Datapage(0)) <---- this has changed as I've tried different variations to grab the barcodecount

Parsed string:String 2:0
Parsed String 2:0

Top
#57844 - 01/05/21 01:36 PM Re: Text Condition on a Variable [Re: dvbsf]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 650
Loc: Québec, Canada
Well comparing 0 with 0 works for me...
Please open a technical ticket. Sorry.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#57845 - 01/05/21 01:41 PM Re: Text Condition on a Variable [Re: dvbsf]
dvbsf Offline
OL Newbie

Registered: 01/07/20
Posts: 12
Loc: Florida
Wait! I just change this

String: Get Meta(BarcodeCount(0), 10, Job.Group(0).document[2].Datapage(0)) <---- this has changed as I've tried different variations to grab the barcodecount

I changed the document to 0 and it accepted it!
GetMeta(BarcodeCount[0], 10, Job.Group[0].Document[0].Datapage[0])

I am starting over at page one, to verify that it is working as intended.

Top