Changes

Jump to: navigation, search

Web Page View Field Variables

427 bytes added, 20:29, 19 September 2018
no edit summary
: <span style="font-size: medium;">'''@companies.''rolename.fieldname''@'''</span>
 
To display a list of the companies assigned at Level 2:
: <span style="font-size: medium;">'''[#(?object=company::orderby=name)~name~ #]'''</span>
 
To get the intersection record identifier (i.e. for use in [[Pandora]] functions)
: <span style="font-size: medium;">'''@company.''fieldname''@'''</span> or <span style="font-size: medium;">'''@company.''customfieldid''@'''</span>
 
When you want to refer to a User Role based [[Custom Field]] '''<u>from</u>''' a [[UTA]] Level 1 record use the following syntax:
Owner:
: <span style="font-size: medium;">'''@owner.''fieldname''@'''</span>
Person:
 
: <span style="font-size: medium;">'''@person.''fieldname''@'''</span>
Contact:
 
: <span style="font-size: medium;">'''@contact.''rolename''.''fieldname''@'''</span>
: ''where rolename is the role they are assigned on the Level 1 record''
'''Options:'''
: {|borderclass="1" cellpadding="5wikitable"OptionEffect|-||'''Option'''||'''Effect'''|-||<span style="font-size: medium;">orderby=''standardfieldname''</span>||Sorts the list in ascending order by the standard field specified|-||<span style="font-size: medium;">orderby=''standardfieldname'' desc</span>||Sorts the list in descending order by the standard field specified|-||<span style="font-size: medium;">orderby=tbl_''customfieldid''.valuestr</span>||Sorts the list in ascending order by the custom field specified|-||<span style="font-size: medium;">criteria=''standardfieldname''='''value'''</span>||Filters the list by the standard field and value specified|-||<span style="font-size: medium;">criteria=tbl_''customfieldid''.valuestr='''value'''</span>||Filter the list by the custom field and value specified|-||<span style="font-size: medium;">criteria=(''standardfieldname''='''value''' or ''standardfieldname''='''value''')</span>||For multiple criteria when '''either''' conditional criteria can apply|-||<span style="font-size: medium;">criteria=(''standardfieldname''='''value''' AND ''standardfieldname''='''value''')</span>||For multiple criteria when '''both''' conditional criteria must apply|-||<span style="font-size: medium;">groupfunction=''aggregatefunction''</span>||Performs specified aggregate function on the listed fields<br />Ex. sum, count, countdistinct|}
* ''multiple options (i.e. a criteria and an orderby option) can be included, separated by doubled colons (::)''
[#(?object=activity)|~statusname~|~typename~|$speciality$|$123456$|#]
:: ''See [[MS Word Merge]] for further details on including tables on MS Word Merge documents''
: :* To reference the Consumer UTA Level 1 owner name and ownerid 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). Grabbing a custom field value off the invoice (ie. 282588) and into an adjustment.
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">Example: [#(?object=appliedtoinvoices)$282588$#]</pre>
::: ''Note: refer to the custom field by the number ONLY, do not use the custom field name.''
:* 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)
[#(?object=contact)#]
||$Cell Phone$
|}
::: ''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:
[#(?object=activity::orderby=startdate desc)#]
:* 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')#]
|}
:* For a list of level 1 records, including owner details, that a Company has been asssigned to:
[#(?(object =level-1) NAME: ~name~ OWNERID: ~ownerid~ OWNERNAME: ~ownername~ #]
 :* For a list of all companies that the owner of a [[UTA]] record is associated with:
@owner.[#(?object=association)~name~ (Phone ~phone~)
:* To get a comma-separated list of the companyids of all the companies the current user is associated with with roleid 54545:
,@me.[#(?object=association::criteria=roleid=54545)~afcompanyid~,#]@
:* For a list of all contacts associated to the current user's parent company record (associated to the company with [[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 given 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 (see also [[sscalculation]])
[#(?object=activity)<!--@sscalculation(date_format("$fieldname$","%M %d, %Y"))-->#]
:* With Multiple Criteria:
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=contact::criteria=(rolename='External' or rolename='Internal'))~firstname~ ~lastname~#]
:* To sort descending by a custom field called ''Total Hours'' with a custom field id of ''67292'':
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=activity::orderby=tbl_67292.valuestr desc)Subject: ~subject~Total Hours: $Total Hours$Start Date: ~startdate~#]
:* To sort descending reviews in a specific status by a custom field on a separate UTA Level 1 field called ''$Staff Final Score$'' with a custom field id of ''1584168'' in numeric order:
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=utaconsumerL1::orderby=tbl_15868.valuestr*1::criteria=(statusname='Member Review'))
:* To list a specific activity type only:
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=activity::orderby=startdate::criteria=typename='This Activity Type')~subject~~location~~startdate~#]
:* To list activities based on the [[Determining the typeid|type ID]] ('''Level 2 and Level 3 only'''):
[#(?object=activity::orderby=startdate::criteria=typeid='24160')#]
:* To include a hyperlink to the object (for Accounts):
[#(?object=company::criteria=rolename="Cooperating Organization")#]
:* To list activities based on status:
[#(?object=activity::orderby=startdate::criteria=statusname='Open')#]
:* To list activities based on the status ID ('''Level 2 and Level 3 only'''):
[#(?object=activity::orderby=startdate::criteria=status.statusid='24160')#]
:* To list UTA Providers:
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=utaproviderL1::criteria=rolename="Panel") ~name~ ~typename~ ~statusname~ ~enddate~ $Panel Review Date$ $Panel ID</pre><pre><!--@sscalculation(@xml.XML Field.People.Person[#(?criteria="~type.nodevalue~" == "A") 1+#]@PRE13@@@0)--></pre><pre style="white-space: -o-pre-wrap; word-wrap: break-word;">lt;br>#]</pre>
:* To list notes (from the record that contains the notes):
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=notes::orderby=createddate desc)~notes~~createddate~~username~#]
</pre>
::: ''Note: This syntax is for "Public (Default)" notes only, not custom note types.:: ::* To list all companies under a parent company record:
[#(?object=company) ~name~ #]
::* To list all L3 allocations within a L2 budget record:
[#(?object=linkactivity) ~subject~ #]
::* To sum or count all the L3 allocations from the budget L2 record:
@linkactivity.sum(...)@ or @linkactivity.count(...)@
||~username~
|}
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">#]
</pre>
:::: ''Note: This syntax is for "Public (Default)" notes only, not custom note types. 
'''To do a sum of all the unpaid payment transaction:
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=utaproviderL2) ~typename~ | ~statusname~ <br />#]</pre>
If you have multiple different UTAs connected as providers, you  can use criteria to filter:
 
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">[#(?object=utaproviderL1::criteria=provappid="12345") ~typename~ | ~statusname~ <br />#]</pre>
==To Format the Start Date or Start Time==
::: <span style="font-size: medium;">'''~date_format(startdate,'%Y-%m-%d') as startdate~'''</span>:::: or::: <span style="font-size: medium;">'''~date_format(startdate,'%h:%i %p') as starttime~'''</span> 
'''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'''"''
==Displaying Both Level 2 and Level 3 Activities at Level 1==
To facilitate this you must create a [[Custom Field Type: Read Only – System Variables|Read Only - System Variable]] field '''at''' Level 2 that contains the list of Level 3 activities, formatted and filtered as desired.
:::: ''You can use [[Visibility Condition]]s, [[Role Field Permissions]] or [[Status Field Permissions]] to prevent the field from being displayed on the Level 2 record.
'''Example:'''
::* Create a Level 2 [[Custom Field Type: Read Only – System Variables|Read Only - System Variable]] Custom Field called '''Level 3 Activity List''' with the following:
[@(?object=activity::orderby=typename)@]
| colspan="3"|$Level 3 Activity List$
|}
:::: '''where''' "Level 3 Activity List" is the name you gave the [[Custom Field Type: Read Only – System Variables|Read Only – System Variable]] field
Instead you can use the following syntax '''within''' the '''[#...#]''' that lists the Level 2 activities:
::: <span style="font-size: medium;">'''[@(?object=activity)~standardfieldname~ $customfieldname$@]'''</span>
'''Note:'''
::* This syntax will only work if there are '''less than 25 fields at Level 3.'''
'''Example:'''
::* To display a list of Level 2 activities, including any Level 3 activities under their parent Level 2 activity:
[#(?object=activity::orderby=startdate) #]
'''where:'''
::* num = number of activities that should be displayed
=XML Variables=
'''Variable List:'''
::: {| border="1" cellpadding="5"
'''Start Date''''''End Date''''''Close Date'''<br />''Level 1 only'''''Modified Date''''''Display Format'''@startdate@@enddate@@closedate@@modifieddate@Date formatted according to user preferences (At Level 1 Modified Date also includes the time: 15:40)@longstartdate@@longenddate@@longclosedate@@longmodifieddate@Friday, January 23, 2009@fullstartdate@@fullenddate@@fullclosedate@@fullmodifieddate@2009-01-23 15:40:00@datetime(fullstartdate)@@datetime(fullenddate)@@datetime(fullclosedate)@@datetime(fullmodifieddate)@2009-01-23 15:40:00@date(fullstartdate)@@date(fullenddate)@@date(fullclosedate)@@date(fullmodifieddate)@2009-01-23
* '''Note''': ''Start Time'' and ''End Time'' are stored within the ''fullstartdate'' and ''fullenddate'' fields respectively. They can be accessed and formatted using the variables elements listed below.
::* '''Note''': ''Start Time'' and ''End Time'' are stored within the ''fullstartdate'' and ''fullenddate'' fields respectively. They can be accessed and formatted using the variables elements listed below.
'''To display specific elements of the Start Date, Start Time, End Date, End Time, Close Date, Modified Date''':
::: {| border="1" cellpadding="5"
@month(fullstartdate)@month number in ''Start Date''@monthname(fullstartdate)@name of month in ''Start Date''@day(fullstartdate)@day in ''Start Date''@dayweek(fullstartdate)@name of day in ''Start Date''@year(fullstartdate)@year in ''Start Date''@hour(fullstartdate)@hour in ''Start Time'' using 12 hour clock (0-12)@ampm(fullstartdate)@AM or PM reference for ''Start Time''@hour24(fullstartdate)@hour in ''Start Time'' using 24 hour clock (0-24)@minute(fullstartdate)@minute in ''Start Time''
::: '''Note:''' For '''End Date''', '''Close Date''' or '''Modified Date''' replace '''fullstartdate''' with '''fullenddate''', '''fullclosedate''' or '''fullmodifieddate''' respectively.'''::: ''(seconds are not available for standard date/time fields)''::: ''('''Close Date''' does not have a time associated with it) 
'''Examples:'''
::* To display the Start Date in the format '''February 22, 1985''' you would use:
@monthname(fullstartdate)@ @day(fullstartdate)@, @year(fullstartdate)@
::* To display the End Time in the format '''06:45PM''' you would use:
@hour(fullenddate)@:@minute(fullenddate)@@ampm(fullenddate)@
'''Variable List:'''
::: {| border="1" cellpadding="5"
VariableContentDisplayComment@datetime(currentdate)@current date and time as for yyyy-mm-dd HH:mm:ss2013-01-22 17:55:22See also [[Obtain Server Date and Time]]@date(currentdate)@current date as for yyyy-mm-dd2013-05-17&nbsp;@currentdate@current date2009 January 25&nbsp;@now@current date and time2009 August 25 11:05AMWorkflows only. Not available within [[UTA]]s
'''To display specific elements of the current date or time''':
::: {| border="1" cellpadding="5"
@month(currentdate)@current month number@monthname(currentdate)@name of current month@day(currentdate)@current day@dayweek(currentdate)@name of current day@year(currentdate)@current year@hour(currentdate)@current hour using 12 hour clock (0-12)@ampm(currentdate)@AM or PM reference for current time@hour24(currentdate)@current hour using 24 hour clock (0-24)@minute(currentdate)@current minute
::: (seconds are not available for the current time) 
'''Examples:'''
::* To display the current date/time in the format '''Friday at 19:55''' you would use:
@dayweek(currentdate)@ at @hour24(currentdate)@:@minute(currentdate)@
'''For a custom field on the same level as the Web Page View Field, you can parse out a particular date/time in a date field'''
::: {| border="1" cellpadding="5"
VariableContentDisplay@date(''fieldname'')@custom field date as for yyyy-mm-dd2013-05-17
'''Examples:'''
::* To display the custom field '''Date Of Birth''' in the format '''31-01-2001''' you would use:
@day(date of birth)@-@month(date of birth)@-@year(date of birth)@
Users can return image thumbnails or meta data from multiple file fields using the list syntax below":
::* Show thumbnail image using thunbnailpath option:
<pre>@multi file name.template[# <img src="~thumbnailpath~" alt="" width="240" /> #]@
</pre>
::* Show thumbnail image and file name using filepath option:
<pre>@multi file name.template[# <img src="~filepath~/thumbnail/?maxwidth=240" alt="" width="240" />~filename~#]@
</pre>
::* Show thumbnail image and file name using compressedpath option:
<pre>@multi file name.template[# <img src="~compressedpath~/thumbnail/?maxwidth=240" alt="" width="240" />~filename~#]@
</pre>
::* Show file name, size and upload date:
<pre>@multi file name.template[# ~filename~, ~filesize~, ~uploaddate~#]@
To display a button to upload to a [[Single File]] or [[Multiple Files]] custom field:
::* Single File: ::: <span style="font-size: medium;"><input class="Button" type="button" value="Button Label" /></span>:: ::* Multiple Files: ::: <span style="font-size: medium;"><input class="Button" type="button" value="Button Label." /></span>
'''where:'''
::* ''customfieldid'' = the field id of the Single or Multiple file custom field (without '''cf_''') 
'''Example:'''
You will also have to call the ''includejsfiles'' function in the body onload:
   
'''Alternatively:'''
To show a [[Custom Field Type: Dynamic Data – Data Grid|Dynamic Data – Data Grid]] field in a webpage view field use the following syntax:
::: <span style="font-size: medium;">'''@fieldname.table'''@</span>  
==Retrieving History for Fields with Track Changes Enabled==
The following syntax is used to retrieve custom field history:
For the [[Status]] standard field:
::: <span style="font-size: medium;">'''@HistoryOf(status)@'''</span>::: <span style="font-size: medium;">'''@HistoryOf(statuscaption)@'''</span>
For a [[Custom Field]]:
::: <span style="font-size: medium;">'''@HistoryOf(''customfieldid'')@'''</span>
OR
: <span style="font-size: medium;">'''@HistoryOf(''customfieldid'')@'''</span>OR: <span style="font-size: medium;">'''@HistoryOf(''customfieldname'')@'''</span>
'''Notes:'''
:::* ''HistoryOf'' is case sensitive.:::* You can only obtain the history of the Status field and [[Custom Fields]] in this way.
==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 Format==
::: You can use the following syntax to format a custom field with currency: @format(L2 Subcontract total y1,currency,USD,2)@. The last parameter can be changed from 2 to 0 to display as a whole number. 
=Controls=
==Hide a variable if it is missing==
Put the following in front of variable name.
::: <span style="font-size: medium;">'''&lt;!--hideifnotfound-->'''</span>
'''Example''':
</pre>
::* The content to be displayed (the middle line) can either be in plaintext or in HTML.::* Be sure there are single quotes 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:
<pre>
</pre>
::: See Also: [[Updateable Web Page View Fields]] if you wish the Web Page View check boxes to have the ability to change the underlying data.
==How to display level two check boxes on level one in the Web Page View==
@checkboxvalue(id
::* Use two "'''|'''" (pipes) to separate '''id''' and '''value''' to be checked
where 1199639 is customfield id
To change the orientation of a page to landscape in a PDF add before the content you deem as the next page.
::* See [[PDF Writer Custom Tags]] for further [[PDF]] formatting options
=Troubleshooting=
::* '''Issue''': 2 variables run together (thus removing the ending @ and beginning @)
::* '''Resolution''': Place a non-breaking space tag (&amp;nbsp;) between the variables.
=Troubleshooting=
* '''Issue''': 2 variables run together (thus removing the ending @ and beginning @)
* '''Resolution''': Place a non-breaking space tag (&amp;nbsp;) between the variables.
::** '''Issue''': For a list of level 2 activities, the code is showing instead of the field headings and values you've designated.
::** '''Resolution''': Insert a comment tag before the first cell tag. i.e.
 
** '''Issue''': For a list of level 2 activities, the code is showing instead of the field headings and values you've designated.
** '''Resolution''': Insert a comment tag before the first cell tag. i.e.
<pre> </pre>
==See Also==
::* [[Root Company Variable]]s::* [[sslogic]]::* [[ssattach]]::* [[sscalculation]]::* [[Web Page View Field]]::* [[Attach a PDF to a Web Page View]]::* [[Updateable Web Page View Fields]]::* [[Changing the Status from a Web Page View]]::* [[Custom Field Type: Display Only – Web Page View]]::* [[:Category:PDF|PDF Category]]::* [[PDF Writer Custom Tags]]::* [[Adding JavaScript JS files to Web Page View Pages]]::* [[Custom Field ID|Determining the Custom Field ID]]::*  
[[Category:Custom Fields]][[Category:Variables]][[Category:PDF]]%20in%20webpage%20view%20field%20showing%20activity" data-mce-href="Allow%20for%20'
Smartstaff, administrator
421
edits

Navigation menu