In This Article
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.
Creating the query
Do the following to create the query:
- Go to RiSE > Intelligent Query Architect > New > Query.
- Name the query, then click the Sources tab.
- Create the query. The properties selected on the Display tab are the only properties available through the Template tab.
- Click the Template tab.
- Use the Insert data source field drop-down to begin adding the query display properties necessary in the template.
- Use the HTML tab to insert custom CSS or HTML to format the template data.
- When the template data is ready, Save the query.
Note: The Template tab accepts bootstrap card containers. See Cards Bootstrap for more information.
Note: See Displaying profile pictures in a query Template for details.
Displaying the query template
Do the following to display the query template:
- Create a new content record or open an existing content record (RiSE > Page Builder > Manage content).
- Select Add content, then open the Utility folder.
- Add the Query Template Display content item to the content record.
- Configure the content item:
- Limit users who can view data for other contacts - (enabled by default) If this option is enabled, only authorized users can view information for contacts other than themselves. This prevents other users from changing the ID in the URL to access another contact's data. Authorized users include staff and Company Administrators for a group that the contact belongs to. Disable this option to allow all users to view information for other contacts, such as for a public profile. If this option is disabled, the system security settings determine whether a user must be logged in to view information for other contacts.
- Source query – Click select and browse to the IQA query. The query must have content defined in the Template tab of the query definition.
- Display in cards – Displays the query content in a container that resembles a card. See the Cards Bootstrap documentation for more information about cards. When this option is not enabled, the query content is displayed in a simple list.
- Display in columns - Displays the information in multiple columns instead of a single column.
- Number of columns – Select the number of card columns to display on each page.
- Rows per page – Enter the number of data rows to display on each page.
- Pager position – The pager is a set of controls that moves the pages of results either forward or backward. Select where the pager is located:
- Left - Select to show paging controls on the bottom left of the page.
- Center - Select to show paging controls in the bottom center of the page.
- Right - Select to show paging controls at the bottom right of the page.
- Use simple pager - Enable to hide the page numbers.
- Hide when there are no results – Enable this option to hide the content item when the query specified returns no results.
- No results tab – Message displayed when the query specified returns no results. If Hide when there are no results is enabled, this tab is disabled.
- Header tab – Messaged displayed above the query results.
- Footer tab – Messaged displayed below the query results.
- Click OK, then Save & Publish the content record.
Note: Results are limited to a maximum of 120. If the column-by-row calculation is greater than 120, the Rows per page value is automatically modified to a value that returns 120 or less.