IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#19846 - 08/14/06 12:40 PM Dashes and Barcodes
Deemer Offline
OL User

Registered: 11/30/05
Posts: 61
Loc: Tarentum, PA
When capturing the LPD output, for what we call a work order, the patient's ID prints with the format ###-##-####. Those numbers that are in this format print this way regardless of the way that they are in the system so it prints in this fashion even if the number in our system has the dashes or not. The problem that this causes is that when I create a barcode using this number from the workorder I receive the dashes in the barcode. What I would like to do is to eliminate the dashes in barcodes. Is there a way to eliminate these characters in the creation of the barcode.

Top
#19847 - 08/14/06 01:19 PM Re: Dashes and Barcodes
Anonymous
Unregistered


You can check the Custom Data Selection in the Data category of your BarCode Object and use the planetPress Talk command strip('char to strip','string to be strip')

so you custom data selection will look like that

=strip('-',@(line, ColumnStart, ColumnEnd)

Top
#19848 - 08/14/06 02:27 PM Re: Dashes and Barcodes
Deemer Offline
OL User

Registered: 11/30/05
Posts: 61
Loc: Tarentum, PA
Thank you that does work.

How would you edit the syntax to display the entire string of characters but strip out the dashes only if they were in 2 specific locations of the string. For instance in my case:
=strip('-',@(9, 12, 22)
works for stripping out all dashes in this range. What if I wanted to strip out the dashes only if they were in position 15 and 18 but leaving them in if they occur elsewhere?

Top
#19849 - 08/14/06 03:36 PM Re: Dashes and Barcodes
Anonymous
Unregistered


use the PlanetPress Talk function if()
if( expression, trueresult, falseresult )

so your expression should look like this:
=if((@(9,15,15) = '-') and (@(9,18,18) = '-'),strip('-',@(9,12,22),@(9,12,22))

Top
#19850 - 08/15/06 08:26 AM Re: Dashes and Barcodes
Deemer Offline
OL User

Registered: 11/30/05
Posts: 61
Loc: Tarentum, PA
David much appreciated with the expression, however when I place this in the CUSTOM DATA SELECTION I recieve a parenthesis mismatch. I have experimented with placing parens in different spaces. But I can not seem to find the correct place for the missing parenthesis. I did place between the brackets:

=if((@(9,15,15) = '-') and (@(9,18,18) = '-'),strip('-',@(9,12,22)[)],@(9,12,22))

that did generate a barcode but when scanned the barcode still retains the dashes.

Top
#19851 - 08/15/06 11:34 AM Re: Dashes and Barcodes
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
Your parenthesis is in the right place there.
The problem may be that the hyphen you are searching for is not the hyphen in your data.

In case that looks like gobbledygook, I will explain - there are at least 3 characters that look very similar and look like hyphens. They have ASCII codes 150, 151 and 173. The one you get from typing the PressTalk, or copy and pasting from this page may not be the one in your data.

To be sure you have the right one you must copy a hyphen from your data file and paste it into your Presstalk code. Inspecting your data file and talk code with the hex viewer will ensure that the hyphens match.

Hope this helps
Stuart

Top
#19852 - 08/16/06 08:48 AM Re: Dashes and Barcodes
Anonymous
Unregistered


You can copy the "gobbledygook" hyphen from you data by using the Get Data from the right click menu.

David P P

Top
#19853 - 08/17/06 11:04 AM Re: Dashes and Barcodes
Deemer Offline
OL User

Registered: 11/30/05
Posts: 61
Loc: Tarentum, PA
Thank you both for the assistance.

Top


Moderator:  cosimo, OL Newsgroup Support