Label Function Syntax: Difference between revisions

From Commander4j
Line 68: Line 68:
===TRIM===
===TRIM===
===UPPERCASE===
===UPPERCASE===
<UPPERCASE(fieldname)>
===USERNAME===
===USERNAME===
===VERSION===
===VERSION===

Revision as of 11:52, 6 September 2024

There are a number of functions which you can embed in your barcode label template to help format the data before sending to a labeller.

DATE_CREATED

This function returns the date & time when the pallet record was created in the database and allows you to specify the format that you want it formatted in the label.

Example usage

<DATE_CREATED(ddMMyy)>
<DATE_CREATED(dd/MM/yyyy)>

If the value of the DATE_CREATED field is null or blank it will return spaces instead of date.

DATETIME

The function allows you to format a datetime/timestamp field value from the database and display it in the label using the format specified.

<DATETIME(fieldname,dd/MM/yyyy  HH:mm:ss)>

EXPIRYDATE

When a label is printed Commander4j will automatically calculate the expiry date of the product. It is important to realise however that the application has 2 modes for recording the expiry date. It can be associated with the individual pallet number (SSCC) or it can be associated with the batch number. The mode that the system is using is defined in System Keys using the setting called EXPIRY DATE MODE

This function will retrieve the value from the appropriate table based on the setting above.

<EXPIRYDATE(MM yyyy)>
<EXPIRYDATE(MM)>
<EXPIRYDATE(yy)>
<EXPIRYDATE(dd)> <EXPIRYDATE(MM)> <EXPIRYDATE(yyyy)>

IIF

<IIF,param1,param2,param3,param4>
IF param1 = param2 then
  return param3
else
  return param4

JULIAN_YJJJ

This function returns the production / manufacturing data in the format {last digit of year}{Julian day number}

<JULIAN_YJJJ()>

LEFT

<LEFT(fieldname,5)>

LOWERCASE

<LOWERCASE(fieldname)>

LTRIM

PADLEFT

PADRIGHT

PALLET_WEIGHT_BARCODE

PALLET_WEIGHT_TEXT

PRODDATE

RIGHT

<RIGHT(fieldname,5)>

RTRIM

SUBSTRING

SUBTR_LPAD

TIMESTAMP

TRIM

UPPERCASE

<UPPERCASE(fieldname)>

USERNAME

VERSION