Creating templates to display query data

Use the IQA Template tab to create unique layouts and displays for any IQA query.

Viewing the Template tab

Before you begin

Review the following information before creating a template to display query data:

  • The maximum number of results to display is 120.
  • Use the ContactProfileImage business object to display profile pictures.
  • If a source is removed from the query and one of the source’s properties is being used in the Template, the property is not automatically deleted from the Template content and must be manually deleted.
  • Properties that use the built-in functions (Count, Max, Min, Avg, Sum) are respected, and the resulting values are displayed in the template.
  • The following are currently not supported in the Query Template Display:
    • Subtotal properties
    • Optional query filters
    • Exporting the query results directly from this iPart

Using placeholders in the Template tab

Placeholders can be used to populate attributes within HTML tags, such as the src attribute of <img> and <a> tags. Placeholders are specified using { } notation. For example:

{datasource[.property... ] [attributes]}

The {#...} placeholder embeds data into the content or title at the placeholder location. The placeholder consists of the following components:

  • datasource - The name of the data source.
  • property - (optional) The name of the property. Can be chained together using dot notation. For example, prop1.prop2.prop3. Where the property is a collection, a specific item can be accessed using [i] notation. For example, .Address[1] would return the item at index position 1 from the Address collection.
  • attributes - (optional) A space delimited set of attributes, some of which require values. Multiple attributes can be specified:
    • uppercase - Convert the data to uppercase.
    • lowercase - Convert the data to lowercase.
    • format - Format non-string values, such as format="d".
    • noencode - By default, inserted properties are HTML-encoded. This means that any HTML characters in your properties are rendered as plain text. Use the noencode attribute to ensure HTML markup is rendered in the browser.
    • Example: <strong>{#Party.FirstName noencode}</strong>

Creating and displaying the template

Create the query using the Template tab in IQA, then display the template using the Query Template Display content item.

Examples

Review the examples to better understand how to utilize query templates.