Views:

Product: LABEL MATRIX

Version: All Versions

 

An Expansion Variable allows you to assign a name to a value or function, and then use the name any place you would normally use the value or function within an expression. This is most useful for reducing the size of large expressions with repeating code, or if you plan to use the same value or function across multiple labels. 

In the following example, we'll create an Expansion Variable that converts a Keyboard Input date in mm/dd/yyyy format into yymmdd format. 

1. Navigate to Tools > Expansion Variable Setup.

                                          

2. Click New.

3. Name the variable and click Insert Function.

4. Select a function category from the Expression Piece window.

 In this case, we'll use String Functions.

5. Choose the Expression Piece(s) you would like to add. 

To create an Expansion variable that can rearrange data from a Keyboard Input, we are going to use the Right Expression, the Left Expression, and the Mid Expression.

6. Click OK. The Expression will appear in the Expansion Variables box.

If you're using multiple expressions, the software will automatically add a plus sign (+) between them, which is necessary for combining multiple objects.

7. Replace the sample data.

The Keyboard Input on the sample label is named Date Input, which is input in mm/dd/yyyy format. This Expansion Variable takes two characters from the right of the input (yy), two characters from the left of the input (mm), and 2 characters from the middle of the input, starting with the fourth character (dd). 

8. Click OK. Close out of the Expansion Variable Setup window.

9. Navigate to Insert > Text to add a new text object. Alternatively, click the A along the left side of the window.

10. From the Data tab, set the data Origin to Combination.

                 

11. Select the Expansion Variable from the list and click Use.

The Expansion Variable will appear in the Expression box. Here, you'll have the option to combine it with other data or fields. For a preview of the content, check the Sample window.

12. Select Place, and click anywhere on the label to create the text object.