Views:

Scenario Overview

In this scenario the HR department had a requirement to know the Age of a contact within the CRM system.  

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • A calculated field (custom html webresource) is added to the Contact form named 'Age'
  • This calculated field executes a formula
  • The formula calculates the Age

                                                                                       

N52 Formula Manager Steps

 

  • Create a new formula of type 'Calculated Field'
  • Set the Source Entity to 'Contact'
  • Set the Display Format to 'String'
  • Copy & paste the formula below into the formula description field & click save
  • Click 'N52 Commands' & then choose 'Publish Formula'

Add Calculated Field to Form

  • Open the Contact form in design mode
  • Add the HTML WebResource to the form named 'north52_html_calculated_field_shortcodes_2013'
  • Set the remainder of the fields as shown below
  • Note the 'Custom Parameter' will need to be the shortcode on your formula
  • On the formatting tab ensure it is set to 1 row, & no border

Formula

if(ContainsData([contact.birthdate]), DateDiffDescription([contact.birthdate], UtcDate(), 'd'), 'NoOp')

Wizard - DateDiff

Please see below the wizard you can use to create the DateDiff () function call used in this formula. 

Note: You will need to go to the Function tab for UtcDate()