AudienceView Connect

Example Dynamic Values

The following sections illustrate example dynamic values:

  • Inserting Line Breaks: Describes how to use the {new_line} value to insert a line break.
  • Summing Values: Describes how to use the dynamic value operators + and - to add or subtract integer, fixed or currency type elements.
  • Checking for a Value: Describes how to check the value of a data element before inserting a dynamic value (e.g. you could use this to check for no value).
  • Extracting a Substring of an Element: Describes how to extract a substring of an element.

Inserting Line Breaks

If you are joining multiple values using a dynamic value, you can use the {new_line} value to insert a line break.

Not leaving space between the street address and the next address element can result in overlapping lines.

For example, printing a customer’s address on a ticket using an element requires leaving multiple lines of space between the street element and the next line in the address. This is to accommodate multiple street address lines. However, if the customer does not have a street address with multiple lines, this method of inserting the address will leave a large gap between the street address and the next line of the address.

In the example printed ticket below, the address is inserted using an element illustrating the potential gap between address lines:

To prevent this gap and to handle multi-line addresses, you can instead use a dynamic value to insert the address and {new_line} to insert line breaks:


If the {new_line} value was not used in the dynamic attribute, the address would appear on one line.

Consider the same address above, printed using the dynamic value:

Summing Values

The dynamic value operators + and - can be used to add or subtract integer, fixed or currency type elements:

{element + element}

{element - element}

Where the element is an integer, fixed or currency value.

Attempting to use the + and - operators with other data types will result in an error.

For example, to display the net value of charges, including included taxes, use the following dynamic values:

  • {Admissions::charge_net + Admissions::charge_incl_tax}
  • {Totals::Admissions::charge_net + Totals::Admissions::charge_incl_tax}
  • {Totals::Bundles::charge_net + Totals::Bundles::charge_incl_tax}

Checking for a Value

There may be instances when you only want to insert an element if it has a value. You can create a conditional element to achieve this.

For example, you want to insert the contact’s title, first and last name on the ticket. Because there may not be a contact title, you can create a condition so that the contact’s title is only included if there is a value. If you do not create this condition, the application may insert a blank space on your ticket.

Use the following table to create this example dynamic value:

Type Field Value
Default Pattern Default Pattern {Contact::title} {Contact::first_name} {Contact::last_name}
Rule Position 1
Rule Pattern {Contact::first_name} {Contact::last_name}
Conditions Parameter Contact Title
Conditions Operator is empty
Conditions Value enter any value
This value acts as a place holder. You can enter any value.

Extracting a Substring of an Element

You can extract a substring of an element by specifying starting location and optionally the length of the string to extract:

{element::[start [,length [,FormatString]]]}


  • element is the element from which the substring is extracted.
  • start is the starting position of the desired substring. The first alphanumeric character in the string is zero.
  • length is the number of alphanumeric characters to include in the returned substring.
  • FormatString is the format of the date substring. For more information, refer to Date Codes.

For example, the following inserts a J and then the first six characters of the marketing data string, the letter K, then the next six characters of the element, and then the letter L at the end:

  • J{Marketing::data1::0,6}K{Marketing::data1::7,6}L

For this full example, refer to Bar Code Formatting for Windows Devices.

This example reformats the performance date and inserts the time on a separate line if entered in on one single line:

{PerformanceDetails::start_date::,,%A %B %#d, %Y}{new_line} {PerformanceDetails::start_date::,,%H:%M:%S}