AgileApps Support Wiki Pre Release

Difference between revisions of "Template Variable Tool"

From AgileApps Support Wiki
imported>Evelyn
m (added condition for Tasks object, where category includes company, user, tasks or project tasks)
Β 
imported>Aeric
Β 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:Templatevariables.gif|right|thumb]] Use this lookup tool to find variables that can be used in templates. These variables are based on fields in objects
===Template Variable Contexts===
Β 
{{:Template Variable Contexts}}
To lookup a template variable:
===Using the Template Variable Tool===
#Choose a Category
{{:Using the Template Variable Tool}}
#;Category:Can contain any of the following:
#::*[[Objects]]
#::*Fields related to Users
#::*In the [[Tasks]] object, Category can be fields in Company, User, Tasks or Project Tasks
#Choose a field from the Category
#;Fields:Contains the available fields from the selected category
#In the Variable Field, find the correct syntax for the template variable
#:Copy the string and paste it into your work (as part of an Email / Print / Workflow HTML template, as Email Subject or in the Body of the message, or in an [[Action]]
#;Variable field:<tt>$account.name</tt>
Β 
:Note: ''The Field Name'' and ''Field Label'' are different
Β 
Β 
===Template Variables in Campaigns===
Β 
When an Accounts-based View/Report is selected as the Campaign Source, then the template variables must be based on the Accounts object (<tt>$account.name</tt>, <tt>$account.number</tt> or <tt>$account.time_zone</tt>, etc.).
Β 
If a template variable based on a different object (Prospects, for example), is included, then unexpected results may occur. For example, consider this ''highly undesirable'' situation:
:*The selected Campaign Source is a View/Report based on Accounts
:*A template variable is inserted, however, it is based on the Prospect object: <tt>$prospect.city</tt>
::As a result, the template variable code ''<tt>$prospect.city</tt> would appear in the campaign email message''. To avoid this raw code from appearing in a campaign message, follow these guidelines:
Β 
;Guidelines for for Template Variables in Campaigns:
*It is important that the Template Variables used in a Campaign match the selected Campaign Source. For example:
:* If the Lists option is selected as the Campaign Source, then the List member fields are available as Template Variables
:* If a Views/Reports option is selected as the Campaign Source, then the {object}-related template variables are available as Template Variables; this includes {{leadprospect}}, Accounts or Contacts objects, only

Latest revision as of 18:28, 25 July 2013

Template Variable Contexts

Template variables have slightly different syntax in different contexts. In addition, the available variables can differ between contexts. The template variable tool gives you the possible variables, in the correct syntax for each context:

Context Available Variables
  • Record fields
  • User Fields, Company Fields

For Service Provider emails:

Using the Template Variable Tool

This tool is used to look up the names of variables that can be used in templates.
The variables are based on fields in objects:

TemplateVariableTool.jpg

To lookup a template variable:

  1. Choose a Category
    Category - Contains multiple categories of fields you can choose.
  2. Choose a field from the Category
    Fields - Contains the fields available in the selected category.
  3. The variable name is displayed. For example:
    Variable field: $user.full_name
  4. Copy the variable name from the field and paste it into your template or email.
Note: The field Name is displayed. It is likely to be somewhat different from the field Label that is displayed in the GUI.
Date and Time Fields

The Date and Time category contains:

  • Current Date:
    Inserts $today, which displays the date in the standard format.
    On June 24, 2011 the date would be displayed as "24 June, 2011".
  • Current Date User Date Format:
    Inserts $today_dateformatted, which uses the format set by the user, or by default, the format set for the company.
    For a date format of mm/dd/yyyy, the value on June 24, 2011 would show as "06/24/2011".