EasyBadge Text Formatting Commands

Modified on Wed, 15 Mar, 2023 at 2:39 PM

[format(date field,"dd/MM/yy")]   = 01/01/2020

[format(record created,"dd/MMM/yyyy")] = 20/Feb/2020

[(zerospace(Number Field,4)]  0001

[Serialnumber] = Links to serial number function in card design options.

___For  Numbers____

[zerospace(Number,4)]

[Right(Number,4)]

 

___Capital Names___

In EasyBadge:

[UCASE(Forename+" "+Surname)] or

[UCASE(Forename)] [UCASE(Surname)]


Trim Commands


Trim unwanted space characters found in  field data eg Paul____ Wade____ = Paul Wade

[Trim(Forename)] [Trim(surname)]


If your example was C123456XYZ and you just wanted the 6 digits then:

 

mid(serialno,2,6)

 

There are two other related functions, left and right. So 

 

left(serialno,2)  takes the first two, 'C1' in the above

 

right(serialno,3)  takes the last three, 'XYZ' in the above

 

In Imagebase

[uppercase(Forename&" "&Surname)]

 

___Name case___

[namecase(lowercase(Forename))]

 

____Remove spaces from missing or empty values____

[SpaceStrings(" ", Title, Initial, Forename, Surname)]

____print in separate lines____

[SpaceStrings("\n", Title, Initial, Forename, Surname)]

 

____Visibility Expression____

One line -             len(Forename+Surname)<25

Forename -         len(Forename+Surname)>=25

Surname -           len(Forename+Surname)>=25

 

Change font, size colour in formula

[Forename]<font color=red face="courier" size="20"> [Surname]

 

For set expiry dates from print date:

[Format(now()+0, "dd/MM/yyyy   hh:mm")]

 

Date of Issue:

[Format(Issue date, "dd mmmm yyyy")]

 

____SerialNumber+1 and SerialNumber+2____

[int(serialnumber)+1]

[int(serialnumber)+2]

07090[ZeroSpace(int(serialnumber)+1,4)]

07090[ZeroSpace(int(serialnumber)+2,4)]

 

### Merge Columns in Excel ###

=A2& " " & B2

### Add .jpg ###

=A2&".JPG"

### Add ‘ ###

="'"&A2&"'"

 

### IMAGES ON DISC ###

"Q:\\from ftp\\Greggs\\IMAGES ON DISK\\" + Image Id +".jpeg"

 

___ postcode function____

=LEFT(G2,LEN(G2)-3)


___Last 8 digit of iso decimal___

=LEFT(F1,8)

 

 

____if record is empty do not print static text?___ ie. [Gate PIN]

[Iif(Gate pin<>"","Gate PIN: " + Gate PIN,"")]

ie. If found, please return to:

[Iif(Club Address<>"","If found, please return to: " + Club Address,"")]

 

 

___RANDOM NUMBER GENERATOR___

[Random(7)] in card design or

1.  Add a new text field click  Menu button top left> Modify Database > Add Field and call it what is required. I have called it “RandomNumber” but you can call it whatever you need to.

2. Modify the field to have these properties    Menu button top left> Modify Database > Modify Field

3. set Default line to ‘Random(7)’    7 = the length of Random number, also set Unique to True.

 

RUN EASYBADGE IN DIFFERENT VERSION

cd "\Program Files <86>"

cd EASYBADGE

easybadge /demo

 

ADDRESS ONE AFTER ANOTHER

[FORENAME] [SURNAME]

[BuildingNumberStreet]

[Locality][iif(Len(Locality) > 0, "\n", "")][City][iif(Len(City) > 0, "\n", "")][County][iif(Len(County) > 0, "\n", "")][post code][iif(Len(post code) > 0, "\n", "")]

 


 

***UV layer for HDP5000***

~IC:\\BBC ID Card UV Layer.bmp

 

Mifare numbers

ISO HEX                [left(Mifare Number,8)]

ISO DECIMAL      [fromhex(Left(Mifare Number,8))]

NON ISO HEX      [mid(Mifare Number,7,2)+mid(Mifare Number,5,2)+mid(Mifare Number,3,2)+left(Mifare Number,2)]

NON ISO DECIMAL           [FromHex(mid(Mifare Number,7,2)+mid(Mifare Number,5,2)+mid(Mifare Number,3,2)+left(Mifare Number,2))]

 

Example of calculated field default value


SetField("Barcode",ISO3166 Country Code + ZeroSpace(AIMS Number,7) + ZeroSpace((Print Count + 1),2))



Example  "United Kingdom UK" as data in field



[right(Country Code,2)]  this would return UK

[left(Country Code, len(Country Code)-3)] would return United Kindom


 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article