Changes

Jump to: navigation, search

The Musings of Chin - Template Formulas

610 bytes added, 19:43, 15 January 2015
no edit summary
'''LetChin's learn about inaugural Musings entry provides a helpful rundown of [[Template Formulas:]] and how they allow you to update field values on any object.
''What?Template Formulas provide a method for updating standard/customfield values on an object behind the scenes upon saving. They let you perform extra calculations after saving an object. They can be handy because they let you[[Category:Chin’s Musings]][[Category:Universal Tracking Application]][[Category:Expert Tips and Tricks]]
1) update an object and perform calculations after it=Let's been saved (i.e. support ticket subjects, say you want to combine an autonumber field with the L1 subject but when you first create the L1 the autonumber hasn't been reserved and stored yet until after you save).learn about Template Formulas:=
2) affect objects at different levels (i==What?==Template Formulas provide a method for updating [[Standard_Field|standard]] or [[Custom_Field|custom field]] values on an object behind the scenes upon saving.eThey let you perform extra calculations after saving an object. a L2 formula They can be used to update a L1, an L1 formula can be used to aggregate its contacts).handy because they let you:
3# update an object and perform calculations after it has been saved (i.e. support ticket subjects, say you want to combine an [[Autonumber|autonumber field]] with the L1 subject but, when you first create the L1, the autonumber hasn't been reserved and stored yet until after you save) .# affect objects at different levels (i.e. a L2 formula can be used to update a L1, an L1 formula can be used to aggregate its contacts).# easily perform difficult calculations with MySQL functionality and avoid heavy scripting (i.e. perform business day calculations).
==Where?==The configuration settings can be found on most entities now, such as [[UTA |UTA]] L1, L2, L3, transactions, contact roles, or company categories.
==How?==
You must specify valid MySQL syntax within the settings box, and each line is ended with a semi-colon. Each line is processed sequentially and in order after saving an object.
==When?==Template Formulas run after an object is saved and uses the newly saved field values for their calculations. They are also [[The Musings of Chin - SmartSimple's Order of Operations|chained ]] such that when saving a L3 the formulas run in the order of L3 global formula, L3 type formula, L2 global formula, L2 type formula, L1 global formula, L1 type formula. When deleting a L3, the formulas for the L2 and L1 are also run.
==Signs when they may be needed==-* When you have to save an object twice to get it to correctly calculate something.
Disclaimer<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Disclaimer: Template Formulas are run by the server, so for performance considerations should not be abused. A Template Formula should only be used when a calculation can not be achieved on the page with calculated value custom fields, or when trying to update a field that does not exist on the page (i.e. at L2 you wish to update a L1 field).</pre> ==See Also==* [[Template_/_Type_Formula|Template Formulas]]
526
edits

Navigation menu