Users with the Profile Rule Admin permission can set up a Profile Rule that calculates a cost or date in a Contract, Company, or Project Profile screen or an additional form using the Formula Editor window. Profile Rule Admins build a date formula using one or more date fields, along with a Day, Month, or Year operator and a Number field that Novatus uses to calculate the date for a related field in the Profile screen or additional form. Admins with a coding background can use the free-form option and directly enter the formula, along with math and precedence operators, into the Formula Editor using all the available fields in the additional form or Profile.
The fields used to build the date formula must be required in order to produce an accurate calculation. Therefore, Profile Rule Admins must ensure the date fields in the Company, Contract, or Project Profile screen that are used in their formula are required fields. If the formula uses an additional field in a Company, Contract, or Project Profile screen, or a field in an additional form captured in a Profile, these profile and additional form fields must also be designated as required.
A company's standard Services contract is a 2-year contract. A Contract Profile Rule is created for all Services contracts to calculate the original expiration date using the contract's effective date.
1. Click Admin in the Navigation Toolbar, and click the Profile Rules link.
2. In the Profile Rules Admin screen, click the Contract Profile link under the Profile Type: Profile heading.
3. In the Profile Rules Edit screen, click Add Rule to display a blank rule record.
4. In the Rules section of the screen, enter Expiration Date Calculation in the Rule Name field.
5. In the Conditions section, click Add Condition to display three fields, and define the condition that will apply the rule to Service contracts:
- Select Contract Type in the Field list.
- Select In (equals) in the Operation list.
- Select Services in the Value list.
6. In the Actions section, click Add Action to display three fields, and build a formula that will populate the Original Exp Date field for all 2-year Services contracts using the date entered into the Effective Date field:
- Select Calculate in the Action Type list.
- Select Original Exp Date in the Field list.
- Click in the Value field to open the Formula Editor window.
Selecting the Edit button in the toolbar of the Formula Editor window allows you to manually type the formula directly into the window using math and precedence operators. The Edit/Ready Only toggle button also populates the variable list with all fields in the Profile or additional form, not just the date fields.
7. In the Formula Editor window, build the formula that says the Original Exp Date for a Services contract is two years from the contract's effective date:
- Select Year in the Date Part field to select year as the unit of measure.
- Enter 2 in the Number field.
- Select Effective Date in the variable list.
- Click Save.
Another option is to select Month in the Date Part field and enter 24 in the Number field, or select Day in the Date Part field and enter 730 in the Number field.
A negative value can be entered in the Number field in the Formula Editor. For example, to calculate a 30-day Notice Period for a contract, you would select Calculate Field in the Action Type list and select Notice Date in the Field list. In the Formula Editor, select Days in the Date Part field, enter -30 in the Number field, and select Original Exp Date in the field list.
8. In the Profile Rules Edit screen, click Save.