Set Different Expression for Same Variable

Posted by: TomK

Set Different Expression for Same Variable - 02/04/10 03:21 PM

I want to know if there is a way to set different expressions for the same variable but in different locations on a layout.

For example [zip] is in an address block should be = [zip] while onecode[zip] should be used just below the address block.

I have inserted two text variable boxes on my layout and embedded [zip] in both and have tried to set a different expression for both with no luck - if you change the [zip] expression in one text box it changes it automatically in the other text variable box.

Posted by: Sander vd Berg

Re: Set Different Expression for Same Variable - 02/05/10 04:02 AM

A variable can be reused across your document, but it will always have the same expression. If you want different expressions, you will need to use different variables. Variables are different if their names are different. You specify the name of a variable between the two @ delimiters in the content of your text box.

Suppose you have two text boxes, with the content of both boxes set to "@zip@". Double-click one of your text boxes and replace "@zip@" by "@onecode_zip@". When you click outside the box you will have two variables: "zip" (defined in the first text box) and "onecode_zip" (defined in the second text box), each with its own expression.