Difference between revisions of "Calculating Information between Levels"

From SmartWiki
Jump to: navigation, search
m
Line 65: Line 65:
  
 
Go to level 2 template and use the following format @level2.#123456#@=@level3.sum(#678954#)@
 
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.
 
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]]
 
[[Category:Universal Tracking Application]][[Category:Applications]]

Revision as of 10:59, 25 June 2008

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.

File: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.

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.

Uta130.png

10. Enter the following formula:

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.

Uta132.png

  • The duration is set to the sum of the durations of the associated 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.