Changes

Jump to: navigation, search

Web Page View Field Variables

733 bytes removed, 15:59, 27 August 2009
To Display a List of Activities, Notes, Transactions, Contacts or Companies
:* <font size="3">criteria=''standardfieldname''=''value''</font> - filters the list to only those items that meet the criteria specified
:* <font size="3">criteria=(''standardfieldname''=''value'' or ''standardfieldname''=''value'')</font> - for multiple criteria
* ''multiple options can be included, separated by semi-colons (;)''
 
:* multiple options can be included, separated by semi-colons (;)
'''Examples:'''
* To generate a list of Level 2 activities for a [[MS Word Merge]]:
[#(?object=activity;)|~statusstatusname~|~typename~|$speciality$|$123456$~|#]::''See [[MS Word Merge]] for further details on including tables on MS Word Merge documents.''
*To generate a list of all contacts for a [[Web Page View]], or [[Custom Field Type: Read Only – System Variables|Read Only – System Variables]] custom field (note that the HTML table formatting is included within the '''[#...#]''' syntax)
<pre>
<table><tr><td>First Name</td><td>Last Name</td><td>E-mail Address</td><td>Cell Phone Number</td></tr>
</table>
</pre>
::''Note: The first line creates a header row for the table''
 
* For a list of Level 2 (or Level 3) activities sorted by Start Date in descending order:
</pre>
 * To sort descending by a custom field called "''Total Hours" '' with a custom field id of ''67292'':
<pre>
[#(?object=activity;orderby=tbl_67292.valuestr desc)<tr><td>Subject: ~subject~</td><td>Total Hours: $Total Hours$</td><td>Start Date: ~startdate~</td></tr>#]
'''Note:''' ''$Total Hours$'' in the list could be listed as ''$67292$'' with the same result.
'''* To list a specific activity type only''':
<pre>
[#(?object=activity;orderby=startdate;criteria=typename='This Activity Type')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#] e.g. where typename='activity name'</pre>
[#(?object=activity;orderby=startdate;criteria=typeid='')<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]
e.g. where typeid='141414'</pre> '''* To list activity activities based on a specific status name or status id''':
<pre>
<table>[#(?object=activity;orderby=startdate;criteria=statusname='Open')<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>#]</tablepre>
e.g. where status.id='1234'</pre>
==To format Format the start date and start timeStart Date or Start Time==<font size="3">~date_format(startdate,'%Y-%m-%d') as startdate~</font>
:or<prefont size="3">~date_format(startdate,'%Y-h:%m-i %dp') as startdatestarttime~</prefont>
'''or'''
<pre>
~date_format(startdate,'%h:%i %p') as starttime~
</pre>
*'''Note: ''':* If you wish to use ''"orderby=startdate"'', along with a date format other than yyyy-mm-dd you must use a slightly different syntax.:*Using ''"~date_format(startdate,'%d-%m-%Y') as startdate~"'' when using ''"orderby=startdate"'' will cause the date to be ordered by dd-mm-yyyy (rather than yyyy-mm-dd, which is chronological) :*To avoid this, change ''"date_format(startdate,'%d-%m-%Y') as '''startdate'''"'' to ''"date_format(startdate,'%d-%m-%Y') as '''sdate'''"''
==How to display level three activities Displaying Level 3 Activities at level one Level 1 in the a Web Page View== When displaying a list of '''Level 2''' activities using the '''[#(?object=activity;)...#]''' syntax, the corresponding '''Level 3''' activities can now be displayed under each of the parent '''Level 2''' activities using:<font size="3">[@(?object=activity;)~standardfieldname~ $customfieldname$@]</font>
When displaying a list of '''Level 2Note:''' activities using the [ # (?object=object;orderby=field) # ] processor, the corresponding '''Level 3* This syntax will only work if there are ''' activities can now be displayed under each of the parent less than 25 fields'''at Level 2''' activities by using [ @ (?object=object;orderby=field) @ ]3.
This new feature allows level one web page fields to '''Example:'''* To display level a list of Level 2 activities, including any Level 3 items. This a type syntax for displaying level activities under their parent Level 2 items. activity:
<pre>
<table border=1>
[#(?object=activity;orderby=startdate)
<tr><td colspan=>Level 2>Activity: ~subject~</td><td>~locationstatusname~</td><td>~startdate~</td><td>~enddate~</td></tr> <tr><td></td><td colspan=3> <table> [@(?object=activity;orderby=typename)<tr><td> Level 3 Activity: ~typename~</td><td>~location~</td></tr>@] </table> </td></tr>
#]
</table>
</pre>
This is the syntax showing level 3 items inside level 2 items.
<pre>
<table border=1>
[#(?object=activity;orderby=startdate)
<tr><td colspan=2>~subject~</td><td>~location~</td><td>~startdate~</td></tr>
<tr>
<td>
<table bgcolor="00FFFF">
[@(?object=activity;orderby=startdate)<tr>
<td>~subject~</td><td>~location~</td><td>~startdate~</td>
</tr>@]
</table>
</td>
</tr>
#]
</table>
</pre>
==How to display Level 3 Activities at Level 1 using Read Only-System Variable Field in Web Page View==
The '''[[Custom Field Type: Read Only – System Variables|Read Only'''-System Variable ]] field can also now be used in the '''a [[Web Page View''' ]] field.  This is useful for to facilitate displaying '''Level 3''' activities at the '''Level 1''' in a '''Web Page View''' fieldCurrently we can display '''Level 3''' activities at '''Level 1''' using the following syntax: <pre><table border=1>[#(?object=activity;orderby=startdate) <tr><td colspan=2>~subject~</td><td>~location~</td><td>~startdate~</td></tr><tr><td> <table bgcolor="00FFFF"> [@(?object=activity;orderby=startdate)<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>@]  </table></td></tr> #]</table> </pre> 
This method, however, has the limitation that only '''Level 3''' activities with less than 25 fields can be displayed using this technique.
To display '''Level 3''' activities that have more than 25 fields, the following method is now available:
1. Create a '''[[Custom Field Type: Read Only – System Variables|Read Only - System Variable''' ]] field at '''Level 2'''. 2. Format that contains the field list of Level 3 activities, formatted and filtered as you would a '''Web Page View''' fielddesired. For example:
'''Example:'''
<pre>
<table border=1> [#@(?object=activity;orderby=startdatetypename) <tr><td colspan=2>Level 3 Activity: ~subjecttypename~</td><td>~location~</td><td>~startdate~</td></tr>#@]
</table>
</pre>
<pre>
<table border=1>[#(?object=activity;orderby=startdate)<tr><td colspan=>Level 2>Activity: ~subject~</td><td>~locationstatusname~</td><td>~startdate~</td><td>~enddate~</td></tr> <tr><td></td><td colspan=23>$123456Level 3 Activity List$</td></tr>#]</table>
</pre>
::'''where''' "Level 3 Activity List" is the name you gave the [[Custom Field Type: Read Only – System Variables|Read Only – System Variable]] field
==Displaying a Specific Number of Items in a List==
0
edits

Navigation menu