In addition to the default variables (about default variables, check the help guide Creating and updating a Template), you can insert more variables in the template editor resulting from special calculations or hidden fields in KanbanBOX.
To set a special variable, first of all get in Print > Add new template, or get in Print > Template list, search the template to modify and click on Edit template and finally click on Edit Front to get in the editor page. For further details, check again the help guide Creating and updating a Template.
Now, let’s check all the special variables in details.
Partner colour as the background of a cell
You can use partner colour set for the supplier or customer as background colour of the currently selected cell. First of all, you need to check or set partner color, available in the menu Masters > Partners > Partners list, under column Color.
Procedure:
- Select the chosen cell;
- Click on Set background colour field;
- Type the following code {supplier_color} to set supplier colour as the background colour of the cell or type {customer_color} to set customer colour as the background colour of the cell;
- Click on Save under Save cell.
Partner colour as font colour of a text
Likewise the background of a cell, you can use a partner colour set for the supplier or customer as font colour of the selected text. First of all, you need to check or set partner colour, available on the menu Masters > Partners > Partners list, under the column Color.
Procedure:
- Select the chosen cell;
- Click on Set font colour field;
- Type the following code {supplier_color} to set supplier colour as font colour of the text in the cell or type {customer_color} to set customer colour as font colour of the text in the cell;
- Click on Save under Save cell.
Image
To insert an image in the kanban card, previously you need to insert it in the File manager.
Procedure:
- Get in Print > File manager;
- Click on the top right corner of the list Upload a new file;
- In the new page, click on Select file;
- Browse the directory to select the image to upload. Once selected, upload it by double-clicking the file or the Open button;
- Once the file is uploaded, KanbanBOX displays the file name. To save it, click on Save image.
Once the image is loaded, you can set the image in the kanban card by the Edit Front page.
Procedure:
- Select the cell where you want to include the image.
- Click on the Cell content field.
- Type the code
{image(<file_name>,<max_width>,<max_height>)}
, whereby:-
<file_name>
is the file name of the image (including the extension .png or .jpg), displayed in Print > File manager; -
<max_width>
(optional field) is the maximum width of the image (in millimeters); -
<max_height>
(optional field) is the maximum height of the image (in millimeters).
-
- Click on Save under Save cell.
Total required capacity
The total required capacity is the result of processing time per unit (set in the kanban loop) multiplies by the quantity of the kanban card.
Procedure:
- Select the cell where you want to include the result;
- In the drop-down menu Insert a variable value select the variable Total required capacity;
- Click on Insert to include the formula into the cell;
- Click on Save under Save cell.
Quantity (unformatted number)
Quantity (unformatted number) means that a particular data isn’t formatted as a number, but remains in its original format. For example, add 1000 as kanban quantity for a particular kanban loop. If you insert the variable Quantity, you print in the kanban card the number 1.000 (the thousands separators set as default for the license), whereas if you insert the variable Quantity (unformatted number), you print the number 1000.
Procedure:
- Select the cell where you want to include the data;
- In the drop-down menu Insert a variable value select the variable Quantity (unformatted number);
- Click on Insert to include the code into the cell;
- Click on Save under Save cell field.
Kanban total weight
The Kanban total weight is calculated as the sum of the product between the part weight (set in the parts master) and the kanban quantity plus the bin weight (set in bins master).
Procedure:
- Select the cell where you want to include the data;
- In the drop-down menu Insert a variable value select the variable Kanban total weight;
- Click on Insert to include the code into the cell;
- Click on Save under Save cell field.
Number of multiples
As number of multiples we refer the number of times that the Multiple batch size is enclosed in the Kanban quantity. So the result is the division of Quantity by Multiple batch size.
Procedure:
- Select the cell where you want to include the data;
- In the drop-down menu Insert a variable value select the variable Number of multiples;
- Click on Insert to include the code into the cell;
- Click on Save under Save cell field.
Format a number - format_number()
You can format a number with the preferred number of decimals and separators for decimals and thousands.
Procedure:
- Select the cell where you want to insert the number.
- Click on the Cell content field.
- Type the code
{format_number(<number>,<decimals>,<decimals_separator>,<thousands_separator>)}
, whereby:-
<number>
is the number to format. Important: the input number must be unformatted!. For example, for card quantity, use Quantity (unformatted number): -
<decimals>
is the number of decimals; -
<decimals_separator>
the character to be used as decimals separator. In the case of a comma, put curly brackets around it{comma}
; -
<thousands_separator>
the character to be used as the thousands separator. In the case of a comma, put curly brackets around it{comma}
;
-
- Click on Save under Save cell field.
Extra Kanban – if_extra_kanban()
If the printed card is an Extra Kanban, you can add a specific text in the kanban card to describe that:
- This card is an Extra kanban card;
- Another attribute of the card, set by the user according to the needs.
Text is printed in the kanban card only if the card is an Extra Kanban.
Procedure:
- Select the cell where you want to include the data.
- Click on the Cell content field.
- Type the code
{if_extra_kanban(<content>)}
, whereby:-
<content>
is the text printed in the card if it’s an extra kanban. For example, write EXTRA or Extra Kanban.
-
- Click on Save under Save cell field.
Kanban – if_not_extra_kanban()
If the card isn’t an Extra kanban, you can add a specific text in the kanban card to describe that:
- This card is a simple kanban card;
- Another attribute of the card, set by the user according to the needs.
Text is printed in the kanban card only if the card is a simple kanban card.
Procedure:
- Select the cell where you want to include the data.
- Click on the Cell content field.
- Type the code
{if_not_extra_kanban(<content>)}
, whereby:-
<content>
is the text printed in the card if it’s not an extra kanban. For example, write Kanban.
-
- Click on Save under Save cell field.
Required date
You can add in the kanban card the required date of replenishment by the supplier, as displayed in the kanban board.
Procedure:
- Select the cell where you want to include the data.
- Click on the Cell content field.
- Type the code
{required_date(<format>)}
, whereby:-
<format>
set date and time format to visualize. You can add these variables:- d: day
- m: month
- Y: year
- H: hour
- i: minute
- s: second.
-
For example, a possible format is the following m/d/Y H:i:s, that displays this result 10/09/2017 13:16:13.
This field is optional. The default data format is set in the menu Settings > Company settings, if nothing is included inside the brackets.
- Click on Save under Save cell field.
Offset before the required date
It’s possible to add an offset to the required date to print to the kanban card an earlier date than the required date. This possibility is used especially when the kanban card requires two steps of processing, and so you want to anticipate the required date for the first step of processing to have time for the second step, too.
Procedure:
- Select the cell where you want to include the date.
- Click on the Cell content field.
- Type the code
{offset_before_required_date(<offset_in_working_days>[,<format>,<calendar>])}
, where:-
<offset_in_working_days>
is the number of working days to remove from the required date. For example, setting the offset to 3, if the required date is 19 nov 2020, in the kanban card the printed date will be 16 nov 2020 -
<format>
is an optional field for date formatting. To set it, please refer to section Required date -
<calendar>
is an optional field to choose with which working days calendar the system calculates the earlier required date. By default it is the loop owner’s calendar. Otherwise, you can write:-
owner
to calculate the date from the loop owner’s calendar. -
supplier
to calculate the date from the loop supplier’s calendar. -
customer
to calculate the date from the loop customer’s calendar.
-
-
- Click on Save under Save cell field.
Print date
It’s possible to add print date and time in the corresponding kanban card. Print date and time is the instant user open printing queue.
Procedure:
- Select the cell where you want to include the date;
- Click on the Cell content field;
- Type the code
{print_date(<format>)}
, whereby<format>
is an optional field. To set, refer to section 11; - Click on Save under Save cell field.
Barcode – Code 128 font as a text
It’s possible to print out the text entered in a cell as a Barcode code 128. The result is a textual barcode.
Procedure:
- Select the cell where you want to include the barcode.
- Write in the Cell content field the text or variables to transform.
- Click on the button Make barcode, or insert the code
{barcode_code128(<content>)}
, whereby<content>
is the text or variables to transform. - Other special characters that is possible to insert in the
<content>
:-
{tab}
to insert a tab character. -
{lf}
to create a new line, it corresponds to the character \n (line feed). -
{ret}
to return to the beginning of the line, it corresponds to the character \r (carriage return).
-
- Click on Save under Save cell field.
Barcode – Code 128 font as an image
It’s possible to print out the text entered in a cell as a Barcode code 128. The result is a barcode in graphic format. With the graphic format you have:
- Good resolution of the barcode after printing;
- Possibility to size width and height of the barcode in detail.
Procedure:
- Select the cell where you want to include the barcode.
- Click on the Cell content field.
- Type the code
{code128(<content>[,<max_width>,<max_height>])}
where:-
<content>
is the text or variables to transform. -
<max_width>
is the maximum width of the barcode (optional). Usually, it matches cell width. -
<max_height>
is the maximum height of the barcode (optional). Usually, it matches cell height.
-
- Click on Save under Save cell field.
Barcode – Code 39 font as an image
In addition to Code 128, it’s also possible to print out the text entered in a cell as a Barcode Code 39. The result is a barcode in graphic format.
Procedure:
- Select the cell where you want to include the barcode.
- Click on the Cell content field.
- Type the code
{code39 (<content>[,<max_width>,<max_height>])}
, whereby:-
<content>
is the text or variables to transform. -
<max_width>
is the maximum width of the barcode (optional). Usually it matches cell width. -
<max_height>
is the maximum height of the barcode (optional). Usually it matches cell height.
-
- Click on Save under Save cell field.
Barcode – Format EAN-13
You can add to the card the barcode of an EAN-13 number in the standard format.
Procedure:
- Select the cell where you want to include the barcode.
- Click on the Cell content field.
- Type the code
{ean13(<content>[,<scale>])}
where:-
<content>
the numerical EAN code of 12 or 13 digits to be converted into a barcode (if absent, the thirteenth digit, or check digit, is automatically added); -
<scale>
the scaling size (optional). By default, the value is 100, which indicates the nominal size. The EAN standard allows using factors between 75 and 200. KanbanBOX accepts any number bigger than zero.
-
- Click on Save under Save cell.
Data Matrix
Data Matrix is a two-dimensional matrix barcode. It’s possible to print out any text or variable entered in a cell as a Data Matrix.
Procedure:
- Select the cell where you want to include the data matrix.
- Click on the Cell content field.
- Type the code
{datamatrix(<content>[,<max_width>,<max_height>])}
, whereby:-
<content>
is the text or variables to transform. -
<max_width>
is the maximum width of the data matrix (in millimeters). -
<max_height>
is the maximum height of the data matrix (in millimeters). -
<max_width>
and<max_height>
are optional field.
-
- Other special characters that is possible to insert in the
<content>
:-
{tab}
to insert a tab character. -
{lf}
to create a new line, it corresponds to the character \n (line feed). -
{ret}
to return to the beginning of the line, it corresponds to the character \r (carriage return).
-
- Click on Save under Save cell field.
QR code
The QR code is a two-dimensional matrix barcode. It’s possible to print out any text or variable entered in a cell as a QR code.
Procedure:
- Select the cell where you want to include the QR code.
- Click on the Cell content field.
- Type the code
{qrcode(<content>[,<max_width>,<max_height>])}
, whereby:-
<content>
is the text or variables to transform; -
<max_width>
is the maximum width of the QR code (in millimeters); -
<max_height>
is the maximum height of the QR code (in millimeters). -
<max_width>
and<max_height>
are optional field.
-
- Other special characters that is possible to insert in the
<content>
:-
{tab}
to insert a tab character. -
{lf}
to create a new line, it corresponds to the character \n (line feed). -
{ret}
to return to the beginning of the line, it corresponds to the character \r (carriage return).
-
- Click on Save under Save cell field.
Carriage return
It is possible to insert a special character that permits to insert a carriage return in a cell. For example, it is useful when you need to insert two information in the same cell.
Procedure:
- Select the cell where you want to insert the carriage return.
- Click on the Cell content field.
- Click where you want to insert the carriage return (for example, between two variables, or between a variable and a text).
- Insert the special character
{br}
to add the carriage return.
Multiplication between values
It’s possible to multiply different values and include the product in the kanban card.
Procedure:
- Select the cell where you want to include the product;
- Type the code
{product(<value_1>,<value_2>[,<value_3>...])}
, with<value_1>
,<value_2>
etc as variables or numbers to multiply and to display the product; - Click on Save under Save cell field.
Fill on the left - fill_left()
It’s possible to format Cell content filling some numbers or letters on the left of the text. It’s useful when we want to format a barcode as input for specific software.
Procedure:
- Select the cell where you want to include the formatted text.
- Click on the Cell content field.
- Type the code
{fill_left(<content>,<filling>,<total_length>)}
, whereby:-
<content>
is the text or variables to transform; -
<filling>
is the text or numbers to fill on the left; -
<total_length>
maximum final total length of the string with the filling. If the string is longer than the total length set, the formula gives back several digits equal to starting from the right of the string;
-
- Click on Save under Save cell field.
Examples:
-
{fill_left(1234,0,6)}
gives back as result 001234; -
{fill_left(1234,0,3)}
gives back as result 234.
Extract a portion of a string - substring()
It's possible to extract a specific number of characters from a text string or a variable starting from a specific position.
Procedure:
- Select the cell where you want to include the formatted text.
- Click on the Cell content field.
- Type the code
{substring(<content>,<offset>,<lenght>)}
, whereby:-
<content>
is the variable or the text to transform; -
<offset>
is the position of the first character that has to be extract from the text.- If
<offset>
is non-negative, the returned string will start at the offset'th position of the string, counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so forth. - If
<offset>
is negative, the returned string will start at the offset'th character from the end of string. For instance, in the string 'abcdef', the character at position -1 is 'f', the character at position -3 is 'd', and so forth.
- If
-
<lenght>
is the number of characters that will be given back. If empty, all the characters positioned after the inserted "offset" are given back.
-
- Click on Save under Save cell field.
Examples:
-
{substring(abcdef,2,3)}
gives back as result cde. -
{substring(abcdef,-3,2)}
gives back as result de. -
{substring(abcdef,1)}
gives back as result bcdef.
Text converted in columns and rows
If you insert a field separated by commas and semicolons, you can convert this text and split it into different rows.
Procedure:
- Select the cell where you want to include the text converted.
- Click on the Cell content field.
- Type the code
{comma_explode_row(<text_with_commas>,<element_index>,<row_index>)}
, whereby:-
<text_with_commas>
is the text or variables to transform; -
<element_index>
index of the text separated by semicolons; -
<row_index>
index of the text separated by commas;
-
- Click on Save under Save cell field.
For example, with the text A,B,C;D,E,F
:
- Text included in the kanban card is
A
if you insert in the cell content field{comma_explode_row(text,1,1)}
; - Text included in the kanban card is
E
if you insert in the cell content field{comma_explode_row(text,2,2)}
.
Text converted in columns
If you insert a field separated by commas (not semicolons), you can convert and split it into different cells.
Procedure:
- Select the cell where you want to include the text converted.
- Click on the Cell content field.
- Type the code
{comma_explode(<text_with_commas>,<element_index>)}
, whereby:-
<text_with_commas>
is the text or variables to transform; -
<element_index>
index of the text separated by commas;
-
- Click on Save under Save cell field.
For example, with the text A,B,C
:
- Text included in the kanban card is
A
if you insert in the cell{comma_explode(text_with_commas,1)}
; - Instead, text included in the kanban card is
C
if you insert in the cell{comma_explode(text_with_commas,3)}
.
Text converted in columns (with delimiter)
If you insert a field separated by a delimiter, you can convert and split it into different cells.
Procedure:
- Select the cell where you want to include the text converted.
- Click on the Cell content field.
- Type the code
{explode_on(<text>,<delimiter>,<element_index>)}
, whereby:-
<text>
is the text or variables to transform; -
<delimiter>
is the delimiter character -
<element_index>
index of the text separated by commas;
-
- Click on Save under Save cell field.
For example, with the text A|B|C
:
- Text included in the kanban card is
A
if you insert in the cell{explode_on(text,|,1)}
; - Instead, text include in the kanban card is
B
if you insert in{explode_on(text,|,2)}
.
Print content if two values are equal or not - if_equal()
It’s possible to insert conditional text in the Cell content, checking if two values are equal. When function parameters might contain commas, the parameters can be escaped by being enclosed by curly brackets {...}.
Procedure:
- Select the cell where you want to include the conditional text.
- Click on the Cell content field.
- Type the code
{if_equal(<first_term>,<second_term>,<text_if_true>,<text_if_false>)}
, where:-
<first_term>
is the left term in the comparison; -
<second_term>
is the right term in the comparison; -
<text_if_true>
is the text that will be output if the comparison result is true; -
<text_if_false>
is the text that will be output if the comparison result is false;
-
- Click on Save under Save cell field.
Example:
-
{if_equal({type_of_kanban},purchase,{supplier_number},NO)}
prints the supplier number if type of kanban is purchase, prints NO otherwise
Print content if a values is numeric or not - if_numeric()
It’s possible to insert conditional text in the Cell content, checking if a value is numeric. When function parameters might contain commas, the parameters can be escaped by being enclosed by curly brackets {...}.
Procedure:
- Select the cell where you want to include the conditional text.
- Click on the Cell content field.
- Type the code
{if_numeric(<term>,<text_if_true>,<text_if_false>)}
, where:-
<term>
is the term to be checked to be numeric or not; -
<text_if_true>
is the text that will be output if the term is numeric; -
<text_if_false>
is the text that will be output if the term is not numeric;
-
- Click on Save under Save cell field.
Example:
-
{if_numeric({part_custom_field_1},{part_custom_field_1},---)}
prints the part custom field if it is numeric, otherwise prints ---
Print different content if the environment is production or test - if_production_env()
It’s possible to print different content in the Cell content, checking if printing is done from the production environment or from the test environment. When function parameters might contain commas, the parameters can be escaped by being enclosed by curly brackets {...}.
Procedure:
- Select the cell where you want to include the conditional text.
- Click on the Cell content field.
- Type the code
{if_production_env(<production_environment_text>,<test_environment_text>)}
, where:-
<production_environment_text>
is the text that will be output if printing is done from the production environment; -
<test_environment_text>
is the text that will be output if printing is done from the test environment. If empty, the output is blank.
-
- Click on Save under Save cell field.
Examples:
-
{if_production_env(ABCD,1234)}
prints ABCD if printing is done from the production environment, 1234 if printing is done from the test environment. -
{if_production_env(ABCD)}
prints ABCD if printing is done from the production environment, leaves the cell empty if printing is done from the test environment. -
{if_production_env(,DO NOT USE)}
leaves the cell empty if printing is done from the production environment, prints DO NOT USE if printing is done from the test environment.
Insert parenthesis, braces and commas as text inside special variables
As seen in multiple examples above, the formulas that allow the insertion of special variables contain parenthesis/braces to determine their start or end, and commas to separate parameters.
For this reason, if it is needed to insert parenthesis, braces, or commas in the text inside a formula, these have to be substituted by the following variables:
Variable | Text shown |
---|---|
{opening_parenthesis} |
( |
{closing_parenthesis} |
) |
{opening_braces} |
{ |
{closing_braces} |
} |
{comma} |
, |
Comments
0 comments
Please sign in to leave a comment.