Product: LABEL MATRIX
Version: All Versions
This article explains how to create an If/Else conditional expression in LABEL MATRIX. An If/Else expression compares a database field or value and returns one result when the condition is true and a different result when the condition is false.
Create an If/Else Expression
Follow these steps to create a text object that displays different values based on a condition.
1. Create a new text object by clicking the Add Text icon.
2. Select the new text object, right-click it, and choose Properties.
3. On the Data tab, change the Origin to Combination.
4. Click Other, select Logic Functions, and then click OK.
5. Select If - Different True or False Result, then click OK.
6. In the expression If(0,"True Condition","False Condition"), highlight the 0, then click Other.
7. Select Logic Functions, then click OK.
8. Select the Equal function and click OK.
The expression should resemble the example below. The placeholders "Variable" and "Equal to Variable" represent the values you will replace with your own database field and comparison value.
9. Highlight the "Variable" placeholder in the expression.
10. Select the database field you want to compare, then click Use. In this example, the field [Sheet1$Lot] is selected.
11. Replace the "Equal to Variable" placeholder with the value that should return a True result. In this example, the comparison value is 12.
How the Expression Works
In this example, the expression compares the value of the database field [Sheet1$Lot] to the value 12.
- If [Sheet1$Lot] equals 12, the expression returns the True Condition.
- If [Sheet1$Lot] does not equal 12, the expression returns the False Condition.
