Project 2000. Custom Fields and Grouping, страница 12

n  Estimated durations can be used in formulas, but they will be treated as normal durations, and the result is not flagged as estimated.

n  When calculation is set to Manual in Tools/Options, custom fields will not recalculate until the user forces a recalculation. When recalculation is performed, every custom field will be recalculated, since due to unpredictable formula interaction there is no easy way to detect which values may have changed.

n  If a custom formula is removed, any existing values in the affected custom field are converted to static data, and the field reverts to its normal user-editable state.

Formula Examples

In a text field, the following formula will display "zero" if Duration is zero, "greater than 1" if a task's duration is greater than 1, and "less than 1" if a task's duration is less than 1 day:

IIf([Duration]=0,"zero",(IIf([Duration]>1440,"greater than 1","less than 1")))

The following formula will take a task name like "My Task" and return only the left portion of the name, e.g., "My":

Mid([Name],1,InStr(1,[Name]," "))

In a text field, the following formula will display "in progress" if a task is in progress, meaning it has both Actual Work and Remaining Work. Otherwise, it will display "not in progress":

IIf(([Actual Work]>0) And ([Remaining Work]>0),"in progress","not in progress")


The following formula concatenates the first names of the first two resources assigned to a task, separated by a comma and a space; for example, if the first resource is “Tom Smith” and the second resource is “Bill White,” the formula will return “Tom, Bill”. (The formula assumes all resource names are in the format "Firstname Lastname".):

Mid([Resource Names],1,InStr(1,[Resource Names]," ")-1) & ", " & Mid([Resource Names],InStr((InStr(1,[Resource Names]," ")+1),[Resource Names],",")+1,InStr((InStr(1,[Resource Names]," ")+1),[Resource Names]," ")-InStr((InStr(1,[Resource Names]," ")+1),[Resource Names],","))


Pasting Data Into Custom Fields; Importing Selective Data

Importing Selective Data

When importing selective data using a data map, if the import/export map specifies that the data is to be merged into the currently active project, custom field data must adhere to any value list restrictions for the target field. Any data that does not match a restricted value list cannot be inserted, and the standard import error message for invalid data is displayed.

This also means that imported data is ignored and no merge occurs if an import/export map specifies merging into a field with a formula, since custom fields based on a formula are read-only.

Pasting Into a Custom Field

When a custom field has a formula, the field is treated as read-only, so the normal read-only rules apply. Attempting to paste into a field with a formula generates an error beep just as for any other read-only field.

Custom Field Behavior with Consolidated Projects and Resource Pools

When projects with custom field attributes are inserted into a master project with “Link to project” checked, all projects retain their own attributes.  The master project can have its own formulas, value lists, and graphical indicators which will not affect the subprojects. The subprojects continue to reflect their own custom field attributes for tasks and summary tasks contained within the subproject. However, since the project summary tasks for the inserted projects are considered tasks of the master project, the master project's summary rollup method and summary formulas will apply to those rows.