Description
The Variable Text feature automatically replaces specific codes entered in text objects with corresponding data. It supports incrementing serial numbers, current date/time, and sequential data from CSV files. This is ideal for automating tasks such as serial number generation and time-stamping.
This article provides a tutorial on creating serial numbers. Please follow the steps below.
Step 1 – Enable Variable Text
1-1. Add a text object. In the text object panel, locate the Variable Text field and toggle it on.
1-2. Once Variable Text is enabled, select the desired type: Serial Number, Current Date/Time, or CSV.
Serial Number: Supports Arabic numerals.
Current Date/Time: Uses your system’s current date and time (format depends on system language).
CSV: Allows you to import a CSV file and populate values sequentially by row and column.
1-3. Enter an offset to adjust the value relative to the current base value.
Offset is only available for Serial Number and CSV types.
For example, if the current serial number is
2and the offset is5, the final output will be7.When using the Array tool, each duplicated object automatically increases by 1. The order of increment follows left-to-right, then top-to-bottom.
1-4. Click the Settings button to configure additional options for the variable text.
Step 2 – Variable Text Format Codes
Enter the corresponding format code based on the selected variable text type.
Please refer to the table below for the available format codes.
Sequence Number
| Format | Input | Description |
|---|---|---|
|
d dd ddd dddd... |
Arabic numerals | The input should be in lowercase, with a maximum of 10 digits. If the current number exceeds the digit limit, only the trailing digits will be displayed. For example, if the variable text is d and the current number is 15, the text will be replaced with 5. |
| h |
In lowercase hexadecimal format |
For example: a, b, f |
| H | In uppercase hexadecimal format | For example: A, B, F |
| 0 | pad numbers with zeros |
If a format starting with 0 is used (e.g., 0ddd), the system will automatically pad the beginning with zeros until the specified length is met. |
#Example:
Enter the following text in Beam Studio:
dddddThe above format represents a 5-digit code.
The system will convert the current value into a 5-digit format. If the current value exceeds five digits, only the last five digits will be displayed.
For example, if the Current Value is 123 and the Offset is 0, the output will be:
123Current Time
| Format | Input | Description |
|---|---|---|
YY |
18 | Two-digits year |
YYYY |
2018 | Four-digits year |
M |
1-12 | Month |
MM |
01-12 | Two-digits month |
MMM |
Jan~Dec | Abbreviated month name |
MMMM |
January~December | Full month name |
D |
1-31 | Date |
DD |
01-31 | Two-digits date |
d |
0-6 | The day of the week, with Sunday as 0 |
dd |
Su~Sa | The min name of the day of the week |
ddd |
Sun-Sat | The short name of the day of the week |
dddd |
Sunday-Saturday | The name of the day of the week |
H |
0-23 | The hour |
HH |
00-23 | Two-digit hour |
h |
1-12 | The hour, 12-hour clock |
hh |
01-12 | The hour, 12-hour clock, two-digits |
m |
0-59 | The minute |
mm |
00-59 | The minute, two-digits |
s |
0-59 | The second |
ss |
00-59 | The second, two-digits |
SSS |
000-999 | The second, three-digits |
Z |
+05:00 | The offset from UTC, ±HH:mm |
ZZ |
+0500 | The offset from UTC, ±HHmm |
A |
AM PM |
|
a |
am pm |
|
#Example:
Enter the following text in Beam Studio:
YY/MM/DD dddd HH:mmThe system will display the current time based on the detected system language. The output:
25/05/27 Tuesday 16:12To display the weekday in English, please change the system language to English and restart the software.
CSV
When using the "CSV" variable text format, the system will automatically combine specific formatted text input and replace it with the corresponding data from the current row of the CSV file.
The % symbol is used to indicate fields, with field numbers starting from 0, in sequence: %0, %1, %2, and so on.
Row numbers also start from 0, and the current value determines which row's data will be displayed.
| Format | Input |
Description |
|
% |
%0 |
First Column |
#Example:
The fields in the CSV data are as follows:
| Student | Subject | Point |
| A | History | 90 |
| B | English | 70 |
| C | Math | 50 |
Enter the following text in Beam Studio:
%0:%1,%2. Represents: Column 1 — Column 2 — Column 3.
If the current value is 0 and the offset is 0, the output will be the first row:
Student:Subject,Point.If the current value is 1 and the offset is 0, the output will be the second row:
A:History,90. Step 3 – Configure Variable Text Parameters
After clicking the settings button, the variable text settings window will pop up. The parameter definitions are as follows:
| Parameters | Description |
| Start | Starting serial number for each batch; or the first row in the CSV file. The start value must not be greater than the end value. |
| End | The last serial number for each batch, or the last row in the CSV file. |
| Current | Set the current value; or the current row in |
| Advance By | The amount to increase each time the value advances. |
| Previous | Previous Value |
| Next | Next Value |
| Test | Instantly update the variable text on the canvas to preview the converted result. |
| Finalize | Convert all variable text on the canvas into static text and remove its variability. |
| Auto Advance | Automatically advance to the next variable value after each job is sent. |
| Browse CSV | Browse CSV file |
| Clear CSV | Remove CSV file |
If Auto-advance is enabled in the variable text settings, the value will automatically advance by one step each time a job is sent. If Auto-advance is disabled, it will remain at the current value.
Others - Code Generator
After selecting 'Variable Text' in the code generator tool, you can enter the text in the specified format, and it will be converted in real time when the job is sent.
Note: If the variable text in the code generator contains a format not supported by the selected barcode—for example, if the barcode only supports English characters but the converted content includes Hebrew—a conversion error will occur. Please check the content and make the necessary adjustments.
If the variable text is not converting correctly, please check the following:
Whether the selected variable text type matches the input format.
Whether the variable text settings are correct, and whether the CSV file is properly uploaded.
Whether all input values are in half-width English characters — full-width characters cannot be recognized.
Comments
0 comments
Please sign in to leave a comment.