Applicable to:
Express   x Planning   - Professional   ✔


Note: Some options and features may vary from the article  below based on your CS Project package.




Using Activity Variables 


Menu option: Configuration > Activity Variables



Activity and resource variables can be created to store any additional activity or resource information for which there are no default fields. The following types of fields can be created: date, duration, integer (numbers without a fractional portion), number (numbers with a fractional portion), text and formula.


Numbers and durations can also be summarised on all levels of the outline structure. When summarising variables, you can only enter these on the lowest level, not on the summary level (which is calculated), similar to e.g. the Fixed Cost. 



When a new project is started, the following variables are generally available:

  • 10 activity text fields named Text1 to Text10
  • 5 activity number fields named Number1 to Number5
  • 5 date fields named Date1 to Date5
  • 2 resource text fields named Text1 to Text2



However, when using the CSP Template, there will be many more pre-configured Activity Variables.


The Define Activity Variables dialogue has one grid with the following fields:


  • Description: enter a name for the variable. This name will be displayed in all field lists.
  • Type: select the type of information you want this variable to hold. You can select from Date, Duration, Integer, Number, Text or Formula.
  • Summarise: this selection is only available for Duration, Integer and Number fields. If you select this flag, the variable will be summarised on each level of the activity/resource outline.
  • Date Type: Dates can be set to Start or Finish.
  • Formula: allows basic operations of elementary arithmetic or logical functions to be used. 
  • Field: the results of a formula field may be passed to a nominated field


Common Uses for Text fields


Text fields can be used as responsibility codes/department codes/sub-contractor codes/plant codes/status flags, etc., or simply to add additional text information to an activity.

Using the appropriate Activity Filter, only the tasks belonging to a department can be displayed.


Note: Activity Code fields have a similar function to text fields, except that they have pre-defined values which the user can choose from. 



Common Uses for Numeric fields 


Activity Numeric fields can be used to track other values such as tonnages, volumes, etc.


Numeric fields can be used instead of resources to enter rough estimates of man hours.


Numeric fields can also be used in filtering and sorting operations


Histograms of numeric fields can be displayed.


Numeric fields can be summarised on different levels of the outline structure, similar to cost fields. 



Common Uses for Date fields 


Date fields can be used to track purchase order placement dates on activities.


Use the field rename function to make it easier to lookup user fields in lists and dialogs. 



Common Uses for Formula fields 


When you use CS Project, you might need to work with values that do not already exist in fields. Formulas enable you to work with fields to create these new values.


Formula fields can be used to apply logical calculations to (or between) existing data fields to give a new variable or to impose the result onto an existing variable.


The following examples illustrate how you can use formulas with custom Activity Variable fields: 


Duration based on Quantity and Production Rate 

You might wish to use an item numeric variable to store the measured quantity of an item and use another to store the production rate and a formula field to calculate the activity duration. 


Create the Activity Variables as shown below

 


Click into the Formula Field for the Calculated Duration and select the following using the Field and Function drop downs



 

The following is an example of the above formula presented in the CS Project Activity Table (Formula fields can then be added to the table via View > Edit Activity Table)



If required, select Duration from the Fields to impose the ‘Calculated Duration’ into the existing ‘Duration’ field



 

Which results in the below




 

Duration based on Calculated Duration and ‘Time Risk Allowance’ (TRA)


To increase durations of activities based on a percentage uplift 





Create the following additional Activity Variables with the following formula

 


Compare number of days left to complete a task (from current date to the finish date)


When added to a custom number field, the following formula returns a numerical value that indicates the number of working days between the current date and the finish date of the tasks in your schedule: 


Days Left = -WORKDAYSDIFF(TIMENOW(),Finish)



 

Compare number of Calendar Days between two dates


Compare Start Date = DAYSDIFF(Planned Start,Start)



 

Create a ‘Latest Order Date’ based on a procurement period


Latest Order Date (formula) = IF(Procurement Period,Start-DAYS(Procurement Period),0)




Note: The above formula creates a numeric number relating to a date, so to display the date it is suggested that the result of the above formula is imposed into a date field (e.g. Latest Order Date).



 

Create a ‘Latest Submission Date’ based on a notice period


Latest Submission Date (formula)
 = IF(Notice Period in weeks,Start-WEEKS(Notice Period in weeks),0)

 


Create a ‘Deadline Countdown’ from current date


Countdown Deadline in Days
 = IF(Notice Period in weeks, ROUNDDOWN((Notice Deadline Date - TIMENOW())/DAYS(1)), 0)




The above formula involves the following steps:


  • If there is a Notice Period required then calculate the Countdown, otherwise return ‘0’
  • Subtract ‘Time Now’ date from the ‘Notice Deadline Date’, this returns a value in Minutes
  • To convert the value to Days, it is divided by 1,440 using the function ‘/DAYS(1)’
  • The resultant value in days is then rounded down to a whole day using the function ‘ROUNDDOWN()’