Difference between revisions of "Role Formula"

From SmartWiki
Jump to: navigation, search
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<nowiki>@totalpoints@=@trans.sum(#1224#+#23445#):typename=''@</nowiki>
+
A Role Formula is analogous to a [[Template / Type Formula]], though it performs advanced calculations and logic on custom fields stored on the Contact profile, for Contacts possessing this Role.
  
In this example, '''totalpoints''' is the custom field we are storing the sum in.
+
The Role Formula is entered on the [[User Role|Edit Role page]] and will only be applicable for contacts who possess this Role.
The sum is of all transactions on the user's record of custom field id numbers 1224 and 23445 given a particular transaction type name.
 
  
 +
An example Role Formula would be:
 +
<nowiki>@totalpoints@=@trans.sum(#1224#+#23445#):typename='whatever'@</nowiki>
 +
*In this example, '''totalpoints''' is the custom field we are storing the sum in.
 +
*The sum is of all [[transactions]] on the user's record of custom field id numbers 1224 and 23445 given a particular transaction type name ("whatever").
 +
*The custom field named '''totalpoints''' will be updated on the profile of contacts who possess this Role every time the contact page is saved.
  
[[Category:System Management]][[Category:Transactions]]
+
==See Also==
 +
* [[Category Formula]]
 +
* [[Transaction Formula]]
 +
* [[Custom Field ID|Determining the Custom Field ID]]
 +
 
 +
[[Category:Field Update Formula‎s]][[Category:Roles]]

Latest revision as of 15:01, 23 October 2017

A Role Formula is analogous to a Template / Type Formula, though it performs advanced calculations and logic on custom fields stored on the Contact profile, for Contacts possessing this Role.

The Role Formula is entered on the Edit Role page and will only be applicable for contacts who possess this Role.

An example Role Formula would be:

@totalpoints@=@trans.sum(#1224#+#23445#):typename='whatever'@
  • In this example, totalpoints is the custom field we are storing the sum in.
  • The sum is of all transactions on the user's record of custom field id numbers 1224 and 23445 given a particular transaction type name ("whatever").
  • The custom field named totalpoints will be updated on the profile of contacts who possess this Role every time the contact page is saved.

See Also