Views:

Product: LABEL MATRIX

Version: All Versions

 

NameExp(data): This function allows you to give a name to a value or function and then use the name any place you would normally use the value or function within the expression. This is most useful for reducing the size of large expressions with chunks of repeating code.

Note: This function will only work within the expression in which it is declared.

Example:
If you use a long expression piece like "1234567890 + 1234567890 + 1234567890" in several places in your expression, you could set up the expression to use a code name in its place.

NameExp(CodeA,"1234567890 + 1234567890 + 1234567890")

The following expression is a checksum calculation that uses the NameExp function.

keyboard1 + NameExp("checksum",sub(10,Right(add(mult(add(mid(Keyboard 1,1,1),mid(Keyboard 1,3,1),mid(Keyboard 1,5,1),mid(Keyboard 1,7,1)),3), add(mid(Keyboard 1,2,1),mid(Keyboard 1,4,1),mid(Keyboard 1,6,1),mid(Keyboard 1,8,1))),1))) +If(equal("checksum","10"),"0","checksum")