Changes

Jump to: navigation, search

Transaction Variables

280 bytes added, 14:33, 15 March 2023
m
Parent Object
* Start Date: @startdate@<br>
* End Date: @enddate@<br>
* Transaction ID: @transid@<br>
* Transaction Type Name: @transtype@<br>
* Transaction Type ID: @transtypeid@<br>
* Last Modified: @trsts@ (transaction time-stamp)<br>
* Custom Fields: @''customfieldname''@ (see note below)<br>
Transactions are often displayed as a list, which can be done using the following syntax:
[#(?object=transaction;::orderby=fieldname;::criteria=typename=&#39;"''thistypename''&#39;" and statusname="Submitted")<tr><td>~subject~</td><td>$customfieldid$</td></tr>#]
===Parent Object===
On a Company/Account transaction you can display or store the name of the Company the transaction is attached to on the transaction by creating a [[Read Only - System Variable]] or [[Store Value - System Variable]] '''on the transaction''' with the following syntax:
:<font size="3">'''@parent.name@'''</font>
On a Contact transaction you can display or store the name of the contact the transaction is attached to on the transaction using:
:<font size="3">'''@parent.fullname@'''</font>
On a UTA L1 transaction you can display or store fields from the level one record the transaction is attached to on the transaction by using the following syntax:
:<font size="3">'''@levelone.fieldname@'''</font>
==Examples==
===UTA Transactions===
To retrieve the '''Level 1''' {{l1}} transactions at '''Level 2'''{{l2}}:
@parent.[#(?object=transaction)<tr><td>~details~</td><td>~subject~</td><td>~startdate~</td></tr>#]@
<!--@sscalculation( [#(?object=transaction;)$add this$+#]0)-->
</pre>
 
* '''Important:''' There <u>must</u> be a space prior to the opening square bracket.
* Also: when summing values don't forget the zero after the closing square bracket. For example, if there are transactions with values of 10, 15 and 20 the statement between the square brackets would be translated as follows:
::''[#(?object=transaction;)$add this$+#]'' &nbsp;&nbsp;&nbsp; becomes &nbsp;&nbsp;&nbsp; ''10+15+20+''
:so the 0 at the end ensures that the statement evaluated doesn't end with a plus sign (which will fail). 
'''Note''': You can also use [[sscalculation]] to format the display of dates
==See Also==
* [[sscalculation]]
* [http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format MYSQL Date Format] Note: this is an external website.
[[Category:Transactions]][[Category:Variables]]
Smartstaff
281
edits

Navigation menu