4,401
edits
Changes
no edit summary
The [[Web Page View Field]] provides the ability to display a fully formatted document or web page.
In constructing this type of page HTML is used in conjunction with the following variables.
==Variable List==
<u>'''User Variables'''</u>
'''@me -- means current user'''
'''@me.firstname@ will be replaced by current user's firstname'''
'''@me.lastname@'''
'''@me.email@'''
'''@me.phone@'''
'''@me.companyname@'''
<u>'''UTA Level 1, Sales Opportunity and Job Variables'''</u>
'''@name@'''
'''@type@'''
'''@status@'''
'''@description@'''
'''@requirements@'''
'''@currency@'''
'''@revenue@'''
'''@probability@'''
'''@modifieddate@'''
'''@closedate@'''
'''@startdate@'''
'''@enddate@'''
'''@jobquestions@''' - displays as combo boxes
'''@jobquestionsr@''' - displays question only
'''@jobskills@'''
'''@owner.field@''' Example: '''@owner.name@''' or '''@owner.address@'''
'''@company.field@''' Example: '''@company.name@''' or '''@company.address@'''
'''@branch.field@''' Example: '''@branch.name@''' or '''@branch.address@'''
<u>'''UTA Level 2 / Activities Variables'''</u>
'''@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@'''
'''@contact@'''
'''@assigned@'''
'''@eventid@'''
'''@objectid@'''
'''@objecttype@'''
'''@rootcompanyid@'''
'''@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@
'''@parent.field@''' (Note: All field names should be entirely lower case.)
Example: @parent.name@ or @parent.startdate@ or @parent.#id#@
<u>'''Custom Field Variables'''</u>
'''@customfield name@ - by name'''
'''or'''
'''@#customfield id#@ - by id'''
Example: @more information@ or @#17342#@
'''Tip for Users''': It is recommended to use the [[Custom Field|custom field]] id in order to avoid conflicts with possible duplicate field names. The field id can be found in the far right column when looking at the [[Custom Field|custom field]] list.
==Field List==
<u>'''People Fields'''</u>
firstname, lastname, name, title, email, phone, company, address, address2, city,
province, state, country, postalcode, owner, modifieddate, cost, costunit, type,
resourcename, isrecource, prefix, suffix, uphoneext
<u>'''Company Fields'''</u>
name, address, address2, city, province, state, country, postalcode, phone, fax, website
<u>'''Lead Fields'''</u>
status, description, name, phone, fax, address, address2, city, state, province, country,
postalcode, website, firstname, lastname, contactphone, title, email, dat_added
==How to display contact information for people associated in the Contacts section==
'''Use the variable''':
@contact.rolename.field@
'''where'''
'''rolename = the name of the role that has been assigned to the contact on the Level One item'''
'''field = the name of the field that is located on the contact's record'''.
Example: @contact.adjuster.firstname@ or @contact.project manager.address@
==How to display a list of UTA Level 1 Activities, Contacts or Companies==
'''object= [activity,contact,user,company,association,level-1 (applies to contacts only) or transaction]'''
'''<table>[#(?object=object;orderby=field)<tr><td>~field~</td><td>~field~</td><td>~field~</td><td>$customfield name or id$</td></tr>#]</table>'''
Example:
<table>[#(?object=activity;orderby=startdate)<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
<table>[#(?object=contact;orderby=lastname)<tr><td>~firstname~</td><td>~lastname~</td><td>~email~</td></tr>#]</table>
<table>[#(?object=contact;orderby=lastname;criteria=role='Internal People')<tr><td>~firstname~</td><td>~lastname~</td><td>~email~</td></tr>#]</table>
'''To list a specific activity type only''':
<table>[#(?object=activity;orderby=startdate;criteria=typename='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where typename='activity name'
<table>[#(?object=activity;orderby=startdate;criteria=typeid='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where typeid='141414'
'''To list activity based on a specific status name or status id''':
<table>[#(?object=activity;orderby=startdate;criteria=statusname='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where statusname='status name'
<table>[#(?object=activity;orderby=startdate;criteria=status.id='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where status.id='1234'
'''To format the start date and start time''':
~date_format(startdate,'%Y-%m-%d') as startdate~
'''or'''
~date_format(startdate,'%h:%i %p') as starttime~
==How to get a UTA contact role /company role record==
[#(?object=company;orderby=name)<td>~name~</td><td>~customfields~</td>#]
==How to retrieve Level 1 Company /Contact Role custom fields==
[#(?object=company;orderby=name)<td>$?opc_fieldid$</td>#]
'''OR'''
[#(?object=contact;orderby=name)<td>$?opr_fieldid$</td>#]
fieldid = the numeric id of the custom field
<u>'''Contact Detail'''</u>
~uprefix~ ~firstname~ ~lastname~
~uaddress~ ~uaddress2~
~ucity~, ~ustate~ ~upostalcode~
==How to display a date format==
'''The following date variables are available for a long date format''':
'''@longclosedate@'''
'''@longstartdate@'''
'''@longenddate@'''
'''@fullstartdate@'''
Example: @longstartdate@ returns "Tuesday, November 15, 2005"
'''The following date variables are also available''':
@now@ - full current date and time
@currentdate@ - full current date only
'''To display only specific elements of the current date''':
@month(currentdate)@ - month number
@day(currentdate)@ - day
@year(currentdate)@ - year
@dayweek(currentdate)@ - name of day
@monthname(currentdate)@ - name of month
'''To display only specific elements of the full start date''':
@month(fullstartdate)@ - month number
@day(fullstartdate)@ - day
@year(fullstartdate)@ - year
@dayweek(fullstartdate)@ - name of day
@monthname(fullstartdate)@ - name of month
'''You can also parse out a particular date format in a date field''':
@year(datefield)@ - returns the year value in datefield
@month(datefield)@ - returns the month value in datefield
@day(datefield)@ - returns the day value in datefield
@hour(datefield)@ - returns the hour value in datefield (0-12)
@hour24(datefield)@ - returns the hour value in datefield (0-24)
@minute(datefield)@ - returns the minute value in datefield
@second(datefield)@ - returns the second value in datefield
==How to hide a variable if it is missing==
'''Put <!--hideifnotfound--> in front of variable name like this'''
Example: <!--hideifnotfound-->@parent.contact.adjuster.email@
==How to display check boxes in the web page view==
'''To display Select Many - Check Box type cutom fields as check boxes in a web page view add @checkbox('customfieldid','option name')@ to the check box control.'''
Example: <input type="checkbox" name="checkbox" value="checkbox" @checkbox('12345','yes')@>
==How to suppress the Page Footer with Printing the Page==
To suppress the footer when printing the page you need to change your browser settings.
'''Internet Explorer'''
1. Choose the '''File Page Setup''' [[Menu|menu]].
2. Delete the '''Header''' and '''Footer''' text.
3. If required, change the margins.
'''FireFox'''
1. Choose the '''File Page Setup''' [[Menu|menu]].
2. Click the '''Margins & Header/Footer''' tab.
3. Set all '''Header''' and '''Footer''' options to '''Blank'''.
3. If required, change the margins.
==How to control print behavior==
'''To define a page break place the following code in the HTML source before the content you deem as the next page''':
<div style="PAGE-BREAK-AFTER: always"><br style="height:0; line-height:0"></div>
'''To change the page orientation to landscape first place the following in the header portion (<head></head>) of the HTML''':
<style type="text/css" media="print">
div.page {
writing-mode: tb-rl;
height: 80%;
margin: 10% 0%;
margin-right: 80pt;
filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=1);
}
</style>
'''Then place <div class="page"></div> in the HTML source around the "page" content.'''
Example: <div class="page">This is the page content that needs to be in landscape</div>
Please note that the page orientation control only works with Internet Explorer and is not the greatest quality print due to the page being converted to an image then rotated.
==How to control print behavior when saving as a PDF==
To define a page break in a PDF add <pd4ml:page.break/> before the content you deem as the next page.
To change the orientation of a page to landscape in a PDF add <pd4ml:page.break pageFormat="rotate"> before the content you deem as the next page.
==Troubleshooting==
In the event of 2 variables running together (removing the ending @ and beginning @) the issue can be resolved by placing a non-breaking space tag ( ) in between each other.
[[Category:Custom Fields]][[Category:Variables]]
In constructing this type of page HTML is used in conjunction with the following variables.
==Variable List==
<u>'''User Variables'''</u>
'''@me -- means current user'''
'''@me.firstname@ will be replaced by current user's firstname'''
'''@me.lastname@'''
'''@me.email@'''
'''@me.phone@'''
'''@me.companyname@'''
<u>'''UTA Level 1, Sales Opportunity and Job Variables'''</u>
'''@name@'''
'''@type@'''
'''@status@'''
'''@description@'''
'''@requirements@'''
'''@currency@'''
'''@revenue@'''
'''@probability@'''
'''@modifieddate@'''
'''@closedate@'''
'''@startdate@'''
'''@enddate@'''
'''@jobquestions@''' - displays as combo boxes
'''@jobquestionsr@''' - displays question only
'''@jobskills@'''
'''@owner.field@''' Example: '''@owner.name@''' or '''@owner.address@'''
'''@company.field@''' Example: '''@company.name@''' or '''@company.address@'''
'''@branch.field@''' Example: '''@branch.name@''' or '''@branch.address@'''
<u>'''UTA Level 2 / Activities Variables'''</u>
'''@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@'''
'''@contact@'''
'''@assigned@'''
'''@eventid@'''
'''@objectid@'''
'''@objecttype@'''
'''@rootcompanyid@'''
'''@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@
'''@parent.field@''' (Note: All field names should be entirely lower case.)
Example: @parent.name@ or @parent.startdate@ or @parent.#id#@
<u>'''Custom Field Variables'''</u>
'''@customfield name@ - by name'''
'''or'''
'''@#customfield id#@ - by id'''
Example: @more information@ or @#17342#@
'''Tip for Users''': It is recommended to use the [[Custom Field|custom field]] id in order to avoid conflicts with possible duplicate field names. The field id can be found in the far right column when looking at the [[Custom Field|custom field]] list.
==Field List==
<u>'''People Fields'''</u>
firstname, lastname, name, title, email, phone, company, address, address2, city,
province, state, country, postalcode, owner, modifieddate, cost, costunit, type,
resourcename, isrecource, prefix, suffix, uphoneext
<u>'''Company Fields'''</u>
name, address, address2, city, province, state, country, postalcode, phone, fax, website
<u>'''Lead Fields'''</u>
status, description, name, phone, fax, address, address2, city, state, province, country,
postalcode, website, firstname, lastname, contactphone, title, email, dat_added
==How to display contact information for people associated in the Contacts section==
'''Use the variable''':
@contact.rolename.field@
'''where'''
'''rolename = the name of the role that has been assigned to the contact on the Level One item'''
'''field = the name of the field that is located on the contact's record'''.
Example: @contact.adjuster.firstname@ or @contact.project manager.address@
==How to display a list of UTA Level 1 Activities, Contacts or Companies==
'''object= [activity,contact,user,company,association,level-1 (applies to contacts only) or transaction]'''
'''<table>[#(?object=object;orderby=field)<tr><td>~field~</td><td>~field~</td><td>~field~</td><td>$customfield name or id$</td></tr>#]</table>'''
Example:
<table>[#(?object=activity;orderby=startdate)<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
<table>[#(?object=contact;orderby=lastname)<tr><td>~firstname~</td><td>~lastname~</td><td>~email~</td></tr>#]</table>
<table>[#(?object=contact;orderby=lastname;criteria=role='Internal People')<tr><td>~firstname~</td><td>~lastname~</td><td>~email~</td></tr>#]</table>
'''To list a specific activity type only''':
<table>[#(?object=activity;orderby=startdate;criteria=typename='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where typename='activity name'
<table>[#(?object=activity;orderby=startdate;criteria=typeid='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where typeid='141414'
'''To list activity based on a specific status name or status id''':
<table>[#(?object=activity;orderby=startdate;criteria=statusname='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where statusname='status name'
<table>[#(?object=activity;orderby=startdate;criteria=status.id='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
e.g. where status.id='1234'
'''To format the start date and start time''':
~date_format(startdate,'%Y-%m-%d') as startdate~
'''or'''
~date_format(startdate,'%h:%i %p') as starttime~
==How to get a UTA contact role /company role record==
[#(?object=company;orderby=name)<td>~name~</td><td>~customfields~</td>#]
==How to retrieve Level 1 Company /Contact Role custom fields==
[#(?object=company;orderby=name)<td>$?opc_fieldid$</td>#]
'''OR'''
[#(?object=contact;orderby=name)<td>$?opr_fieldid$</td>#]
fieldid = the numeric id of the custom field
<u>'''Contact Detail'''</u>
~uprefix~ ~firstname~ ~lastname~
~uaddress~ ~uaddress2~
~ucity~, ~ustate~ ~upostalcode~
==How to display a date format==
'''The following date variables are available for a long date format''':
'''@longclosedate@'''
'''@longstartdate@'''
'''@longenddate@'''
'''@fullstartdate@'''
Example: @longstartdate@ returns "Tuesday, November 15, 2005"
'''The following date variables are also available''':
@now@ - full current date and time
@currentdate@ - full current date only
'''To display only specific elements of the current date''':
@month(currentdate)@ - month number
@day(currentdate)@ - day
@year(currentdate)@ - year
@dayweek(currentdate)@ - name of day
@monthname(currentdate)@ - name of month
'''To display only specific elements of the full start date''':
@month(fullstartdate)@ - month number
@day(fullstartdate)@ - day
@year(fullstartdate)@ - year
@dayweek(fullstartdate)@ - name of day
@monthname(fullstartdate)@ - name of month
'''You can also parse out a particular date format in a date field''':
@year(datefield)@ - returns the year value in datefield
@month(datefield)@ - returns the month value in datefield
@day(datefield)@ - returns the day value in datefield
@hour(datefield)@ - returns the hour value in datefield (0-12)
@hour24(datefield)@ - returns the hour value in datefield (0-24)
@minute(datefield)@ - returns the minute value in datefield
@second(datefield)@ - returns the second value in datefield
==How to hide a variable if it is missing==
'''Put <!--hideifnotfound--> in front of variable name like this'''
Example: <!--hideifnotfound-->@parent.contact.adjuster.email@
==How to display check boxes in the web page view==
'''To display Select Many - Check Box type cutom fields as check boxes in a web page view add @checkbox('customfieldid','option name')@ to the check box control.'''
Example: <input type="checkbox" name="checkbox" value="checkbox" @checkbox('12345','yes')@>
==How to suppress the Page Footer with Printing the Page==
To suppress the footer when printing the page you need to change your browser settings.
'''Internet Explorer'''
1. Choose the '''File Page Setup''' [[Menu|menu]].
2. Delete the '''Header''' and '''Footer''' text.
3. If required, change the margins.
'''FireFox'''
1. Choose the '''File Page Setup''' [[Menu|menu]].
2. Click the '''Margins & Header/Footer''' tab.
3. Set all '''Header''' and '''Footer''' options to '''Blank'''.
3. If required, change the margins.
==How to control print behavior==
'''To define a page break place the following code in the HTML source before the content you deem as the next page''':
<div style="PAGE-BREAK-AFTER: always"><br style="height:0; line-height:0"></div>
'''To change the page orientation to landscape first place the following in the header portion (<head></head>) of the HTML''':
<style type="text/css" media="print">
div.page {
writing-mode: tb-rl;
height: 80%;
margin: 10% 0%;
margin-right: 80pt;
filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=1);
}
</style>
'''Then place <div class="page"></div> in the HTML source around the "page" content.'''
Example: <div class="page">This is the page content that needs to be in landscape</div>
Please note that the page orientation control only works with Internet Explorer and is not the greatest quality print due to the page being converted to an image then rotated.
==How to control print behavior when saving as a PDF==
To define a page break in a PDF add <pd4ml:page.break/> before the content you deem as the next page.
To change the orientation of a page to landscape in a PDF add <pd4ml:page.break pageFormat="rotate"> before the content you deem as the next page.
==Troubleshooting==
In the event of 2 variables running together (removing the ending @ and beginning @) the issue can be resolved by placing a non-breaking space tag ( ) in between each other.
[[Category:Custom Fields]][[Category:Variables]]