photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: StanRohrer on August 26, 2024, 10:50:21 PM

Title: Design & Print: Docment Variables
Post by: StanRohrer on August 26, 2024, 10:50:21 PM
In Design & Print, Document Template, Dynamic Document, is a field shown as Document Variables. What is the syntax to create a variable and assign a value to it?

Let's say I want a variable something like "Price" and assign a text/string value of "$250". Text/string letters are fine. I've tried the following to no avail: 
{Price}="$250"

On some Group Page I will later expect to pull and use/display the variable value and the syntax would be something like:
{Price}

Please give me some examples of working variables in the Document Variables functions.
Title: Re: Design & Print: Docment Variables
Post by: wolboe on August 27, 2024, 12:41:55 AM
Look here:
https://www.photools.com/help/imatch/impexp_print.htm?dl=hid-38 (https://www.photools.com/help/imatch/impexp_print.htm?dl=hid-38)

{Price}="$250
Richtig wäre:/That would be correct:

{Print.Property.Price}=$250
Title: Re: Design & Print: Docment Variables
Post by: sinus on August 27, 2024, 07:23:09 AM
Quote from: wolboe on August 27, 2024, 12:41:55 AMLook here:
https://www.photools.com/help/imatch/impexp_print.htm?dl=hid-38 (https://www.photools.com/help/imatch/impexp_print.htm?dl=hid-38)

{Price}="$250
Richtig wäre:/That would be correct:

{Print.Property.Price}=$250


Yes, that is the correct way.

You see in the attachement an example in the document variables from me.
Then used this variable on a page with the long variable here

<TextBlock Foreground='#556eaf' VerticalAlignment='Center' HorizontalAlignment='Center' TextAlignment='Center' FontFamily='Ravie' FontSize='38pt|diu' FontWeight='Bold'>{Print.Property.0-B-Betreffend}</TextBlock>{File.Annotations}

And the result in the attachement.

Such global variables inside D&P are very useful.

Title: Re: Design & Print: Docment Variables
Post by: Mario on August 27, 2024, 09:32:52 AM
1. Define the variable and give it a value. No braces, no "

Price=$250 

2. Access the variable:

{Print.Property.Price}

See Document Variables (https://www.photools.com/help/imatch/impexp_print.htm?dl=hid-38) for additional examples and documentation.
Title: Re: Design & Print: Docment Variables
Post by: StanRohrer on August 27, 2024, 03:43:54 PM
Thanks for the examples and reference to the manual. My searches in the manual for "variables" somehow didn't get to the needed location. Your help here is appreciated.