Difference between revisions of "Calculating Information between Levels"

From SmartWiki
Jump to: navigation, search
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
If you wish to perform calculations on fields associated with Level 3, but store the results in fields at the Level 2, you use the '''Level 2 Formula''' field.  You can use any expression and also some built in functions.
+
#REDIRECT [[Template / Type Formula]]
 
+
[[Category: Universal Tracking Application]]
[[Image:Uta128.png]]
 
 
 
When you wish to use multiple template formulas, you must use the semicolon to separate them.  For example:
 
 
 
'''@opportunity.totals@=@#123456#@;@opportunity.quantity@=@654321@'''
 
 
 
==Using a Level 2 Type Formula==
 
 
 
In order to use this technique in the current example you will need to first enable the duration field in the Level 2 activity.
 
 
 
1. Click '''Settings'''.
 
 
 
2. Click '''Application Configuration'''.
 
 
 
3. Click the '''Activity Settings''', '''Standard Fields''' link.
 
 
 
4. Enable the '''Duration''' field.
 
 
 
[[Image:Uta129.png]]
 
 
5. Click the '''Save''' button.
 
 
 
6. Click '''Settings'''.
 
 
 
7. Click '''Activity Settings''', '''Types''' tab.
 
 
 
8. Click the '''Addendum''' type.
 
 
 
9. Scroll to the '''Level 2 Formula'''.
 
 
 
[[Image:Uta130.png]]
 
 
10. Enter the following formula:
 
 
 
[[Image:Uta131.png]]
 
 
11. Click the '''Save''' button.
 
 
 
This expression will be executed any time a Level 3 item is saved.
 
 
 
12. Click the '''My Actions''' tab.
 
 
 
13. Click either '''Level 3''' activity type.
 
 
 
14. Click the '''Save''' button.
 
 
 
15. Review the associated '''Level 2''' activity.
 
 
 
[[Image:Uta132.png]]
 
 
* The duration is set to the sum of the durations of the associated [[Level 3 Entity|Level 3 entities]].
 
* The same technique can be applied to the Level 1 [[Template]] formula to sum all the Level 2 durations.
 
 
 
 
 
 
 
 
 
 
 
'''Summing Level 2 to Level 1 using field ID:'''
 
 
 
Go to level 1 template and use the following format @opportunity.#123456#@=@level2.sum(#987763#)@
 
 
 
'''Summing Level 3 to Level 2 using field ID:'''
 
 
 
Go to level 2 template and use the following format @level2.#123456#@=@level3.sum(#678954#)@
 
 
 
'''Summing Level 3 to Level 2 base on a particular level 3 type:'''
 
 
 
Go to level 2 template and use the following format @level2.#50235#@=@level3.sum(#50291#):eventtype=8866@
 
 
 
 
 
Note: Currently the system doesn't support summing from level 3 to level 1 using a custom field id. The summing would only work with Amount and Duration field.
 
 
 
[[Category:Universal Tracking Application]][[Category:Applications]]
 

Latest revision as of 14:31, 30 September 2009