Current User
Note: "me" denotes the current user
@me.firstname@ will be substituted with the current user's first name
@me.lastname@
@me.email@
@me.phone@
@me.companyname@
@me.type@ (returns 'User', 'Local User Administrator', or 'Global User Administrator')
UTA Level 1, Sales Opportunity and Job Variables
@name@ - standard field Application Name.
@type@ - standard field Application Template Type.
@status@ - standard field Status
@typecaption@ - standard field Application Template Type Caption.
@statuscaption@ - standard field Status Caption
@type_lang@ - standard field Application Template Type (Based on user language setting).
@status_lang@ - standard field Status (Based on user language setting)
@description@
@requirements@
@currency@
@revenue@
@probability@
@modifiedby@ / @modifiedbyid@
@modifieddate@
@closedate@
@startdate@
@enddate@
@createddate@
@createdby@
@createdbyid@
@jobquestions@ - displayed as combo boxes
@jobquestionsr@ - displays questions only
@jobskills@
@owner.field@
Example: @owner.fullname@ or @owner.address@
@person.field@
Example: @person.fullname@ or @person.address@
@company.field@
Example: @company.name@ or @company.address@
@company.owner.field@
Example @company.owner.email@
@branch.field@
Example: @branch.name@ or @branch.address@
@apptype@ the Application ID (appid) of the UTA.
UTA Level 2 / Activities Variables
@subject@
@description@
@location@
@startdate@
@enddate@
@isallday@
@modifieddate@ (numeric value including time)
@longmodifieddate@ (text value excluding time)
@starthour@ - (0-23)
@starth@ - (0-12)
@startpmam@ - (PM or AM)
@startminute@
@endhour@ - (0-23)
@endh@ - (0-12)
@endpmam@ - (PM or AM)
@endminute@
@owner@
@eownerid@ - user ID of the owner
@contact@
@assigned@
@eventid@
@typename@
@objectid@
@objecttype@
@rootcompanyid@
@rootcompany.name@
@contact.field@ @eamount@
Example: @contact.firstname@ or @contact.email@
@assigned.field@
Example: @assigned.firstname@ or @assigned.email@
@contact.company.field@ (same as assigned)
Example: @contact.company.address@ or @contact.company.city@
Custom Field Variables
@customfield name@ - by name
or @#customfield id#@ - by id
Examples:
@more information@
or
@#17342#@
UTA Level 1 variables accessed from UTA Level 2
If your Web Page View is at Level 2, you may access Level 1 variables using:
@parent.fieldname@ or @parent.#fieldid#@ (Note: All field names should be entirely in lowercase.)
Examples:
@parent.status@
or
@parent.startdate@
or
@parent.#12345#@
UTA Level 2 variables accessed from UTA Level 3
When operating at Level 3, you may access Level 2 variables using:
@parent.fieldname@
or
@parent.#fieldid#@
(Note: All field names should be entirely in lowercase.)
UTA Level 1 variables accessed from UTA Level 3
If your Web Page View is at Level 3, you may access Level 1 variables using:
@parent.parent.fieldname@
or
@parent.parent.#fieldid#@
(Note: All field names should be entirely in lowercase.)
Level 3 Associated Parent (Opportunity)
In instances where Payment Allocation is enabled, you have two models to select from prior to configuration: typically, the Associated Parent is a Funding Stream of Overall Budget (event) and the associated object is the Disbursement (Level 3). In less granular instances, the Associated Parent is the opportunity.
Level 3 Associated Parent
If Payment Allocation is enabled, you can extract fields from the Associated Parent using the following variable:
@linkparent.fieldname@
If your associated payment is linked to the event, you can extract fields from the opportunity using the following variable:
@linkparent.parent.fieldname@
For example,
@linkparent.parent.branch@
will return: SmartSimple Inc.
Regarding the company/branch:
@linkparent.parent.branch.Transit@
will return: 1950
Field List
People Fields
firstname, lastname, fullname, title, email, phone, company, address, address2, city, province, state, country, postalcode, owner, modifieddate, cost, costunit, type, resourcename, isresource, uprefix (prefix), usuffix (suffix), uphoneext (Phone Extension)
Company Fields
name, address, address2, city, province, state, country, postalcode, phone, fax, website
Lead Fields
status, description, name, phone, fax, address, address2, city, state, province, country, postalcode, website, firstname, lastname, contactphone, title, email, date_added
UTA Contact and Account Variables
Owner:
@owner.fieldname@
Person (Level 1 only):
@person.fieldname@
Assigned (Level 2 only):
@assigned.fieldname@
Company (Level 1 only):
@client.fieldname@
Utilize @client.categoryids@ to return a list of category IDs - comma delimited - noting the leading comma - e.g. ",1234,555,666,"
Utilize @client.categories@ to return a list of category names - comma delimited e.g. "Agency,Marketing,Good client"
Level 1 Contacts/Accounts
Individual
To display information for a single contact/account in the Level 1 contacts/accounts section:
@contact.rolename.fieldname@
or
@company.rolename.fieldname@
where:
- rolename = the name of the role assigned to the contact/account on the Level One item
- fieldname = the name of the field located on the contact's record.
Examples:
@contact.adjuster.firstname@
or
@company.funding agency.address@
Note: If there is more than one contact/account assigned with the specified rolename, only one will be displayed.
List
To present a list of multiple contacts or accounts in the Level 1 contacts/accounts section, please utilize the following syntax:
[#(?object=contact) ~fieldname~ #]
or
[#(?object=company) ~fieldname~ #]
Please refer to the details below for information on how to filter and sort the list(s).
- Note: To display the role assigned to the contact or account on the Level 1 record, utilize: ~role~
- Note: To display the name of the contact's company, employ: ~companyname~
Level 2 Contacts/Accounts
Individual
To present information for a single contact within the Level 2 contacts section, please use the following syntax:
@contacts.rolename.fieldname@
where:
- rolename = the designation of the role assigned to the contact on the Level 2 item
- fieldname = the designation of the field present on the contact's record.
Example:
@contacts.adjuster.firstname@
Note: In cases where multiple contacts are assigned the specified rolename, only one will be displayed.
Contacts
To present a list of contacts assigned at Level 2:
[#(?object=contact) ~firstname~ ~lastname~ ~email~ #]
To display only those contacts assigned at Level 2 with a specific role or roles (this is relevant only if the Level 2 Multiple Contact List is enabled):
[#(?object=contact::criteria=roleid=12345) ~firstname~ ~lastname~ ~email~ #]
To obtain the intersection record identifier (equivalent to ~oprid~ at Level 1), which can be utilized in Pandora functions:
[#(?object=contact) ~lnkid~ #]
To present the contact's profile status:
[#(?object=contact) ~firstname~ ~lastname~ ~ustatusid~ #]
Notes:
- Contacts at Level 2 cannot be filtered by rolename, only by roleid.
- If the multiple contact list is enabled, utilize ~role~ to display the assigned role.
Accounts
To present information for a single account within the Level 2 accounts section:
@companies.rolename.fieldname@
To present a list of companies assigned at Level 2:
[#(?object=company::orderby=name)~name~ #]
To obtain the intersection record identifier (for use in Pandora functions):
[#(?object=company) ~clnkid~ #]
Notes:
- The Account standard field is only available at Level 2 when the Multiple Account list is enabled.
To display Level 1 Company Role or Contact Role custom fields
[#(?object=company;)$?opc_customfieldid$#]
or
[#(?object=contact;)$?opr_customfieldid$#]
where:
- customfieldid = the numeric identifier of the custom field
Note: For Level 2 records (when the multiple contact/company list(s) are enabled), utilize $?opr2_customfieldid$ and $?opc2_customfieldid$.
Using the same format as above, you may also reference custom fields on the company role using the @#field id#@ syntax.
Contact Detail
~uprefix~ ~firstname~ ~lastname~
~uaddress~ ~uaddress2~
~ucity~, ~ustate~ ~upostalcode~
To display Company Association or Contact Association fields
The syntax for extracting information regarding the entity to which they are associated is as follows:
[#(?object=association)~name~ ~standard field name~ $?afc_custom field id$ $?afc_custom field name$#]
[#(?object=companyassociation)~standard field name~ $custom field id$ $custom field name$#]
where:
- standard field name = the designation of the standard field
- custom field id = the numeric identifier of the custom field
- custom field name = the designation of the custom field
The syntax for extracting information on fields that are on the intersection, rather than the entity to which they are associated, is as follows:
[#(?object=association) ~afcompanyid~ #]
[#(?object=companyassociation)~afroleid~ #]
Additional intersection specific variable options include:
- ~afcid~: association (intersection) record identifier.
- ~afcompanyid~: companyid of the associated company
- ~afcontactid~: userid of the associated contact
- ~afroleid~: roleid of the association
- ~afstartdate~: commencement date of the association
- ~afenddate~: conclusion date of the association
Role-Based Custom Fields
When you possess a Custom Field such as a Web Page View or MS Word Merge that is located on a User Role or Company Role, you can access:
UTA Level 1 Information:
@levelone.fieldname@
or
@levelone.customfieldid@
Contact Information:
@contact.fieldname@
or
@contact.customfieldid@
Company Information:
@company.fieldname@
or
@company.customfieldid@
When you intend to refer to a User Role-based Custom Field from a UTA Level 1 record, utilize the following syntax:
Owner:
@owner.fieldname@
Person:
@person.fieldname@
Contact:
@contact.rolename.fieldname@
where rolename refers to the role assigned on the Level 1 record
To Present a Compilation of Activities, Notes, Transactions, Contacts, Companies, Consumers, Providers
[#(?object=objectname::{options})~standardfieldname~ $customfieldname$#]
Where:
- objectname represents the designation of the item to be enumerated.
Options include:
address, activity, assign, contact, user, group, company, notes, association, companyassociation, transaction, timesheet, level-1, utaproviderL1, utaproviderL2, utaconsumerL1, utaconsumerL2, linkactivity
- standardfieldname is the designation of a standard field (encased in tildes, ~)
- customfieldname is the designation of a custom field (encased in dollar signs, $)
Notes:
- You may refer to Custom Fields within the list using the Custom Field ID instead of the field name, still encased in dollar signs ($12345$)
- level-1 may only be utilized as an object when referenced from a contact record. Furthermore, level-1 will only enumerate the Level 1s to which the contact has been assigned within the contacts section.
- Text as well as variables may be incorporated within the [#...#] syntax.
- When employing this syntax for Web Page Views, Read Only – System Variables etc., it is advisable to include HTML table formatting within the [#...#] syntax (refer to examples below). For MS Word Merge custom fields, the table defined in the MS Word Template document should have columns delimited by pipes (|) within the [#...#].
- ~Index~ can be employed to number the lines (1, 2, 3...) Note: ~index~ does not function for all lists. For instance, it cannot be used when enumerating contacts associated with a Level 1.
- ~Index~ (uppercase 'I') initiates numbering at 1, ~index~ (lowercase 'i') initiates numbering at 0.
- ~eventid~ will display the ID of the Level 2.
Options:
Option | Effect |
orderby=standardfieldname | Sorts the list in ascending order based on the specified standard field. |
orderby=standardfieldname desc | Sorts the list in descending order based on the specified standard field. |
orderby=tbl_customfieldid.valuestr | Sorts the list in ascending order based on the specified custom field. |
criteria=standardfieldname=value | Filters the list by the specified standard field and value. |
criteria=tbl_customfieldid.valuestr=value | Filters the list by the specified custom field and value. |
criteria=(standardfieldname=value or standardfieldname=value) | For multiple criteria when either conditional criteria may apply. |
criteria=(standardfieldname=value AND standardfieldname=value) | For multiple criteria when both conditional criteria must apply. |
groupfunction=aggregatefunction | Performs the specified aggregate function on the listed fields. e.g., sum, count, countdistinct. |
- Multiple options (i.e., a criteria and an orderby option) may be included, separated by double colons (::).
Important: Any custom fields utilized as criteria or orderby must be displayed. If you prefer not to display the field, you may place it in a comment (e.g., <!--$12343$-->). However, if referencing a field as a property of a table, the value must be shown.
Examples:
- To produce a list of Level 2 activities for an MS Word Merge:
[#(?object=activity)|~statusname~|~typename~|$speciality$|$123456$|#]
- To reference the Consumer UTA Level 1 owner name and owner ID from a Provider UTA Level 1 Read Only - System Variable custom field:
[#(?object=utaconsumer::criteria=statusname IN ('Placed','Resigned/Terminated'))~ownername~,~ownerid~ #]
- To display custom fields via List Syntax for Invoicing (objectname=appliedtoinvoices), capturing a custom field value from the invoice (e.g., 282588) into an adjustment:
[#(?object=appliedtoinvoices)$282588$#]
Note: Refer to the custom field by its number ONLY; do not utilize the custom field name.
- To generate a list of all contacts (note that the HTML table formatting is included within the [#...#] syntax):
[#(?object=contact::orderby=lastname)~firstname~ ~lastname~ ~email~ </br>#]
Note: The first line establishes a header row for the table.
- For a list of Level 2 (or Level 3) activities sorted by Start Date in descending order:
[#(?object=activity::orderby=startdate desc)~subject~~location~~startdate~#]
- For a list of contacts assigned to a Level 1 with the role of "Internal People," sorted by surname:
[#(?object=contact::orderby=lastname::criteria=rolename='Internal People')~firstname~ ~lastname~ ~email~#]
- For a list of Level 1 records, including owner details, to which a Company has been assigned:
[#(?(object =level-1) NAME: ~name~ OWNERID: ~ownerid~ OWNERNAME: ~ownername~ #]
- To display the Level 1 ID of the Level 1 records:
[#(?(object =level-1) OPPORTUNITY ID: ~op.opportunityid as oppid~ #]
- For a list of all companies associated with the owner of a UTA record:
@owner.[#(?object=association)~name~ (Phone ~phone~)#]@
- To obtain a comma-separated list of the company IDs of all companies with which the current user is associated, having role ID 54545:
@me.[#(?object=association::criteria=roleid=54545)~afcompanyid~,#]@
- For a list of all contacts associated with the current user's parent company record (associated with the company having roleid 12345):
@me.parent.[#(?object=association::criteria=roleid='12345')~firstname~ ~lastname~ (Phone ~phone~)#]@
- For a list of a company's active (current date is between start and end date) associations:
[#(?object=association::criteria=(afstartdate is null OR afstartdate<='@date(currentdate)@') AND (afenddate is null OR afenddate>='@date(currentdate)@'))~userid~,#]
- For a list of all contacts/users located under a company with a specified role:
[#(?object=user::criteria=rolelist like '%,12345,%') ~email~ #]
- To count the number of contacts assigned with the role of Reviewer:
[#(?object=contact::criteria=rolename="Reviewer"::groupfunction=count)~userid~#]
- To include and format a date stored in a custom field (refer to sscalculation):
[#(?object=activity)<!--@sscalculation(date_format("$fieldname$","%M %d, %Y"))-->#]
- With multiple criteria:
[#(?object=contact::criteria=(rolename='External' or rolename='Internal'))~firstname~ ~lastname~#]
- With multiple order criteria:
[#(?object=activity::orderby=tbl_1765133.valuestr::tbl_1765119.valuestr desc)~type~, $1765133$, $1765119$<br />#]
Note: Multiple options (i.e., a criteria and an orderby option) may be included, separated by double colons (::).
- To sort in descending order by a custom field titled Total Hours with a custom field ID of 67292:
[#(?object=activity::orderby=tbl_67292.valuestr desc)Subject: ~subject~Total Hours: $Total Hours$Start Date: ~startdate~#]
Note: $Total Hours$ in the list could alternatively be listed as $67292$ yielding the same result.
- To sort descending reviews in a specific status by a custom field on a separate UTA Level 1 field titled $Staff Final Score$ with a custom field ID of 1584168 in numeric order:
[#(?object=utaconsumerL1::orderby=tbl_15868.valuestr*1::criteria=(statusname='Member Review'))
Note: $Staff Final Score$ in the list could also be represented as $15868$ with the same outcome.
- To list a specific activity type exclusively:
[#(?object=activity::orderby=startdate::criteria=typename='This Activity Type')~subject~~location~~startdate~#]
- To list activities based on the type ID (Level 2 and Level 3 only):
[#(?object=activity::orderby=startdate::criteria=typeid='24160')~subject~ ~location~ ~startdate~#]
- To include a hyperlink to the object:
[#(object=company::criteria=rolename="Cooperating Organization")<a href="/s_viewcompany.jsp?companyid=~companyid~" target="_blank">~name~</a></br>#]
- To list activities within a table based on the status Draft and sort by startdate:
<table>
[#(?object=activity::orderby=startdate::criteria=statusname='Draft')
<tr>
<th>~subject~</th>
<th>~location~</th>
<th>~startdate~</th>
</tr>
#]
</table>
- To enumerate activities within a table according to the status ID (Level 2 and Level 3 exclusively):
<table>
[#(?object=activity::orderby=startdate::criteria=status.statusid='76987')
<tr>
<th>~subject~</th>
<th>~location~</th>
<th>~startdate~</th>
</tr>
#]
</table>
- To enumerate UTA Providers:
[#(?object=utaproviderL1::criteria=rolename="Panel") ~name~ ~typename~ ~statusname~ ~enddate~ $Panel Review Date$ $Panel ID <!-- @sscalculation(@xml.XML Field.People.Person[#(?criteria="~type.nodevalue~" == "A") 1+#]@ 0) -->#]
- To enumerate notes (from the record that encompasses the notes):
[#(?object=notes::orderby=createddate desc)~notes~~createddate~~username~#]
Note: This syntax pertains solely to "Public (Default)" notes, excluding custom note types.
- To enumerate all companies under a parent company record:
[#(?object=company) ~name~ #]
- To enumerate all Level 3 allocations within a Level 2 budget record:
[#(?object=linkactivity) ~subject~ #]
- To sum or count all the Level 3 allocations from the Level 2 budget record:
@linkactivity.sum(...)@
or
@linkactivity.count(...)@
- To list Level 2 notes for each Level 2 record at Level 1:
[#(?object=activity::orderby=startdate desc)~subject~~description~~startdate~
[@(?object=notes::orderby=createddate desc)@]]
Note: This syntax is intended exclusively for "Public (Default)" notes, excluding custom note types.
- To calculate the sum of all unpaid payment transactions:
Total Paid: [#(?object=transaction::criteria=trstranstype=11 and tbl_1145339.valuestr='Paid'::groupfunction=sum)$1145183$ #] Note: $1145339$ - Status of payment $1145183$ - Payment Amount |
Referencing Standard Fields of UTA Providers
Field Name | Variable |
---|---|
Application Name | ~name~ |
Type Name | ~typename~ |
Type ID | ~type~ |
Status Name | ~statusname~ |
Status ID | ~statusid~ |
Start Date | ~startdate~ |
End Date | ~enddate~ |
Close Date | ~closedate~ |
Branch | No variables |
Branch ID | ~branchid~ |
Currency | No variables |
Exchange Currency | No variables |
Currency Exchange Rate | No variables |
Customer | ~client~ |
Customer ID | ~companyid~ |
Modified By | No variables |
Modified Date | No variables |
Owner (full name) | ~ownername~ |
Owner (userid) | ~updatedby~ |
Person (full name) | No variables |
Person (userid) | ~oppeopleid~ |
Role Name | ~rolename~ |
Role ID | ~conroleid~ |
Example:
[#(?object=utaproviderL1) ~typename~ | ~statusname~ <br />#]
Field Name | Variable |
---|---|
Activity Type | ~typename~ |
Activity Type ID | ~typeid~ |
Owner | ~ownername~ |
Owner ID | ~eownerid~ |
Assigned People | No variables |
Status | ~statusname~ |
Status ID | ~statusid~ |
Subject | ~subject~ |
Description | ~description~ |
Location | ~location~ |
Amount | ~eamount~ |
Start Date | ~startdate~ |
End Date | ~enddate~ |
Opportunity ID | ~cevconoppid~ |
Event ID | ~cevprovevtid~ |
Rolename | ~rolename~ |
Role ID | ~cevroleid~ |
Example:
[#(?object=utaproviderL2) ~typename~ | ~statusname~ <br />#]
In instances where multiple distinct UTAs are designated as providers, filtering criteria may be applied:
[#(?object=utaproviderL1::criteria=provappid="12345") ~typename~ | ~statusname~ <br />#]
Formatting the Start Date or Start Time
~date_format(startdate,'%Y-%m-%d') as startdate~
~date_format(startdate,'%h:%i %p') as starttime~
Note:
- If you plan to use "orderby=startdate" in conjunction with a date format other than yyyy-mm-dd, a slightly different syntax must be utilized.
- Employing "~date_format(startdate,'%d-%m-%Y') as startdate~" when using "orderby=startdate" will result in the date being ordered by dd-mm-yyyy (as opposed to yyyy-mm-dd, which is chronological).
- To avoid this, adjust "date_format(startdate,'%d-%m-%Y') as startdate" to "date_format(startdate,'%d-%m-%Y') as sdate".
Displaying a Specific Number of Items in a List
When the objective is to display a specific number of activities or transactions in a Web Page View, utilize the following syntax.
[#(?object=object::orderby=field) <!--@sslogic(~index~='num')--> ~standard field~ $custom field$ <br /> <!--@end--> #] <br />
where:
- num = the number of activities to be displayed
XML Variables
Counting Selected Options
<!--@sscalculation(@xml.XML Field.People.Person[#(?criteria="~type.nodevalue~" == "A") 1+#]@ 0)-->
Filtered XML Display Output
@xml.XML Field.People.Person[#(?criteria="~type.nodevalue~" == "A")~FirstName.nodevalue~ ~LastName.nodevalue~<br />#]@
Date and Time Variables
Standard Date and Time Fields
@startdate@ → Start Date (formatted according to user preferences)
@enddate@ → End Date
@closedate@ → Close Date
@modifieddate@ → Modified Date (Level 1 includes time: e.g., 15:40)
Long Format Dates
@longstartdate@ → Friday, January 23, 2009
@longenddate@
@longclosedate@
@longmodifieddate@
Full Format Dates
@fullstartdate@ → 2009-01-23 15:40:00
@fullenddate@
@fullclosedate@
@fullmodifieddate@
Date and Time Functions
@datetime(fullstartdate)@ → 2009-01-23 15:40:00
@date(fullstartdate)@ → 2009-01-23
Note: 'Start Time' and 'End Time' are stored in 'fullstartdate' and 'fullenddate'.
Extracting Specific Elements
Replace 'fullstartdate' with 'fullenddate', 'fullclosedate', or 'fullmodifieddate' as necessary.
@month(fullstartdate)@ → Month number
@monthname(fullstartdate)@ → Month name
@day(fullstartdate)@ → Day of the month
@dayweek(fullstartdate)@ → Day of the week
@year(fullstartdate)@ → Year
@hour(fullstartdate)@ → Hour (12-hour format)
@ampm(fullstartdate)@ → AM/PM
@hour24(fullstartdate)@ → Hour (24-hour format)
@minute(fullstartdate)@ → Minute
Note: Seconds are not available. The Close Date does not contain a time component.
Date Formatting Examples
Start Date formatted as: "February 22, 1985"
@monthname(fullstartdate)@ @day(fullstartdate)@, @year(fullstartdate)@
End Time formatted as "06:45PM"
@hour(fullenddate)@:@minute(fullenddate)@@ampm(fullenddate)@
Current Date and Time Variables
@datetime(currentdate)@ → 2013-01-22 17:55:22
@date(currentdate)@ → 2013-05-17
@currentdate@ → 2009 January 25
@now@ → 2009 August 25 11:05AM (Workflows only)
Extracting Elements from the Current Date
@month(currentdate)@
@monthname(currentdate)@
@day(currentdate)@
@dayweek(currentdate)@
@year(currentdate)@
@hour(currentdate)@
@ampm(currentdate)@
@hour24(currentdate)@
@minute(currentdate)@
Example: "Friday at 19:55"
@dayweek(currentdate)@ at @hour24(currentdate)@:@minute(currentdate)@
Custom Date and Time Fields
@date(fieldname)@ → 2013-05-17
@month(fieldname)@ → 05
@monthname(fieldname)@ → May
@day(fieldname)@ → 17
@dayweek(fieldname)@ → Friday
@year(fieldname)@ → 2013
@hour(fieldname)@ → 12
@ampm(fieldname)@ → AM
@hour24(fieldname)@ → 00
@minute(fieldname)@ → 00
@second(fieldname)@ → 00
Example: Date of Birth formatted as "31-01-2001"
@day(date of birth)@-@month(date of birth)@-@year(date of birth)@
Note: This syntax is applicable solely for custom fields at the same level. Utilize sscalculation for fields at different levels.
Miscellaneous Variables
Incorporating an Image from Upload Fields
Users have the capability to retrieve image thumbnails or metadata from multiple file fields using the following list syntax:
- Display thumbnail image utilizing the thumbnailpath option:
@multi file name.template[# <img src="~thumbnailpath~" alt="" width="240" /> #]@
- Display thumbnail image and file name using the filepath option:
@multi file name.template[# <img src="~filepath~/thumbnail/?maxwidth=240" alt="" width="240" />~filename~#]@
- Display thumbnail image and file name utilizing the compressedpath option:
@multi file name.template[# <img src="~compressedpath~/thumbnail/?maxwidth=240" alt="" width="240" />~filename~#]@
- Display file name, size, and upload date:
@multi file name.template[# ~filename~, ~filesize~, ~uploaddate~#]@
Incorporating a File Upload Button
To present a button for uploading to a Single File or Multiple Files custom field:
- Single File:
<input class="Button" type="button" value="Button Label" />
- Multiple Files:
<input class="Button" type="button" value="Button Label." />
Where:
- customfieldid = the field ID of the Single or Multiple file custom field (excluding cf_)
Example:
<input class="Button" type="button" value="Multiple files..." />
Note: if adding to a Web Page View you will need to incorporate the following into the page:
function include_dom(script_filename) { var html_doc = document.getElementsByTagName('head').item(0); var js = document.createElement('script'); js.setAttribute('language', 'javascript'); js.setAttribute('type', 'text/javascript'); js.setAttribute('src', script_filename); html_doc.appendChild(js); return false; } function includejsfiles() { include_dom("/validate.js"); }
Additionally, you must invoke the includejsfiles function in the body onload:
Alternatively:
You may also utilize @fieldname.uploadlink@ to obtain the URL for the upload page and construct your own function to open the window.
Example:
<input class="Button" type="button" value="Upload" />
function openupload(url) { upload_window = window.open(url,'upload_window', 'menubar=yes,scrollbars=yes,width=800,height=600,status=no,resizable=yes,dependent=yes,alwaysRaised=yes'); upload_window.opener = window; upload_window.focus(); }
Note: this method will only open the single file upload page.
Displaying a Dynamic Data Grid Field
To display a Dynamic Data – Data Grid field in a web page view field, use the following syntax:
@fieldname.table@
Retrieving History for Fields with Track Changes Enabled
The following syntax is utilized to retrieve the history of standard or custom fields:
For the Status standard field:
@HistoryOf(status)@
@HistoryOf(statuscaption)@
For a Custom Field:
@HistoryOf(customfieldid)@
OR
@HistoryOf(customfieldname)@
Notes:
HistoryOf is case sensitive.
For Hybrid Sign-Up Pages
The @user_input_form@ will display the associated user sign-up form on a company sign-up page if included in the HTML template of the company sign-up page.
Currency Formatting
You can utilize the following syntax to format a custom field with currency:
@format(L2 Subcontract total y1,currency,USD,2)@
The last parameter may be adjusted from 2 to 0 to display as a whole number.
Session Variables
When utilizing features such as Organization Switching, it may be necessary to retrieve specific data based on your current session.
Company Fields:
@sessioncompany.fieldname@
For example:
@sessioncompany.name@
would return the Company Name of the organization you are currently logged in as.
Controls
Concealing a Variable if Missing
Insert the following in front of the variable name.
<!--hideifnotfound-->
Example:
<!--hideifnotfound-->@parent.contact.adjuster.email@
Note: the <!--hideifnotfound--> and the variable must be in immediate succession, with no intervening spaces.
Displaying Different Content Based on a Value Using SSlogic
To present content based on a value from a variable, prepend
<!--@sslogic('@branch.name@'='Internal Staff')-->
to the content and append
<!--@end-->
to the conclusion of the content. If there are two distinct pieces of content to be displayed based on a value, and all others, include
<!--@else-->
between the two pieces of content.
<!--@sslogic(CONDITION)--> The content to be displayed when the condition is true. This can span multiple lines. <!--@end-->
- The content to be displayed (the middle line) can be either plaintext or HTML.
- Ensure that single quotes are used around the variable and value.
- SSlogic does not support nested logic statements.
Example:
- The following will display a Christmas tree image if the month is December:
<!--@sslogic(month(now())=12)--> <img src="images/xmasstree.jpg" alt="" /> <!--@end-->
Refer to SSlogic for additional information and further examples.
Displaying Check Boxes in the Web Page View
To represent Select Many - Check Box type custom fields as check boxes in a web page view, incorporate
@checkbox('fieldname/fieldnumber','option name')@
into the check box control.
This syntax is applicable if the check boxes are on the same level.
Example:
<input type="checkbox" />
To suppress the footer during the printing of a page, it is necessary to modify your browser settings.
Internet Explorer
1. Select the File Page Setup menu.
2. Remove the Header and Footer text.
3. If necessary, adjust the margins.
Firefox
1. Select the File Page Setup menu.
2. Navigate to the Margins & Header/Footer tab.
3. Set all Header and Footer options to Blank.
4. If necessary, adjust the margins.
How to Control Print Behavior When Saving as a PDF
To define a page break in a PDF, insert the following before the content you wish to designate as the next page.
To change the orientation of a page to landscape in a PDF, insert the following before the content you wish to designate as the next page.
Adding JavaScript JS Files to Web Page View Pages
To include JavaScript JS files in a Web Page View custom field, you must utilize the following method.
<script language="JavaScript"> function include_dom(script_filename) { var html_doc = document.getElementsByTagName('head').item(0); var js = document.createElement('script'); js.setAttribute('language', 'javascript'); js.setAttribute('type', 'text/javascript'); js.setAttribute('src', script_filename); html_doc.appendChild(js); return false; } function includejsfiles() { include_dom("/validate.js"); include_dom("/anotherfile.js"); } </script>
You will also have to call the includejsfiles function in the body onload on the Web Page View:
<body onload="includejsfiles();">
Explanation
JavaScript JS files can be added to Browser Script custom fields or on template pages, sign-up pages, etc. using the following syntax:
<SCRIPT type="text/javascript" language=JavaScript src="/validate.js"></SCRIPT>
Using this method on Web Page View custom fields will cause the page to crash in certain browsers, particularly Internet Explorer. Accordingly, the includejsfiles method above must be used for Web Page Views.
Important
- The includejsfiles method must be called onload. If you try to call it before the full page has loaded, some browsers will freeze.
Updateable Web Page View Fields
This code can be used in the field type of 'Web page view' to allow for user to enter data into the form which will be updated on their records on the system. Currently this function is only available for the custom fields and not the standard fields. The following sample code is the format in which this web page view should be in order to be accessible by the user.
Sample Code
<html> <body> [@formstart@] [@formsubmitpage=page_will_be_redirected_after_save@] <input type=text name='obj.fd_name' value="@name@"> <p> <input type=text name='obj.cf_18168' value="@#18168#@"> <input type=submit value="Save"> [@formend@] </body> </html>
Breakdown of the syntax
[@formstart@] : Mandatory, indicates start of a updatable form, only one form can exist on a web page field
[@formsubmitpage=page_will_be_redirected_after_save@] : Optional, what page will be redirected after save, stays on the same page if this tag is missing. Typically, a confirmation page on SmartFolder will be used.
[@formend@] : Mandatory, indicates end of a updatable form.
<input type=text name='obj.fd_name' value="@name@"> or <input type=text name='obj.cf_18168' value="@#18168#@">The @name@ and @#18168#@ are just typical web page view variable syntax, this will prepopulate the existing values into the field. The obj.fd_name and obj.cf_18168 instructs which field to store the value in. Standard fields start with obj.fd_ while custom fields start with obj.cf_. For the custom fields use the field id number to address the field.
Displaying Checkbox field
To display a Checkbox inside an updateable webpage view field use the following syntax:
<input type=hidden value="" name='obj.cf_fieldid'> <input type='checkbox' onclick="onlyonechecked(this)" name='obj.cf_fieldid' value='value of field' @checkbox('fieldid','value of field')@>
- You must include a hidden object with the same name as the check box object, directly prior to the checkbox object.
Example:
<tr><td><input type=hidden value="" name='obj.cf_12345'> <input type='checkbox' onclick="onlyonechecked(this)" name='obj.cf_12345' value='Financial' @checkbox('12345','Financial')@>Financial </td></tr>