Enum TaskKey

TaskKey enumeration

Represents a list of supported task fields.

public enum TaskKey : byte

Values

NameValueDescription
Uid0Represents the Unique ID (Task) field.
Id1Represents the Id (Task) field.
Name2Represents the Name (Task) field.
Type3Represents the Type (Task) field.
IsNull4Represents the IsNull (Task) field.
Created5Represents the Created (Task) field.
Contact6Represents the Contact (Task) field.
WBS7Represents the WBS (Task) field.
WBSLevel8Represents the WBSLevel (Task) field.
OutlineNumber9Represents the OutlineNumber (Task) field.
OutlineLevel10Represents the OutlineLevel (Task) field.
Priority11Represents the Priority (Task) field.
Start12Represents the Start (Task) field.
Finish13Represents the Finish (Task) field.
Duration14Represents the Duration (Task) field.
DurationVariance15Represents the DurationVariance (Task) field.
Work16Represents the Work (Task) field.
Stop17Represents the Stop (Task) field.
Resume18Represents the Resume (Task) field.
IsResumeValid19Represents the IsResumeValid (Task) field.
IsEffortDriven20Represents the IsEffortDriven (Task) field.
IsRecurring21Represents the IsRecurring (Task) field.
IsOverallocated22Represents the IsOverallocated (Task) field.
HasOverallocatedResource23Represents the HasOverallocatedResource (Task) field.
IsEstimated24Represents the IsEstimated (Task) field.
IsMilestone25Represents the IsMilestone (Task) field.
IsCritical26Represents the IsCritical (Task) field.
IsSubproject27Represents the IsSubproject (Task) field.
IsSubprojectReadOnly28Represents the IsSubprojectReadOnly (Task) field.
IsMarked29Represents the IsMarked (Task) field.
IgnoreWarnings30Represents the IgnoreWarnings (Task) field.
SubprojectName31Represents the SubprojectName (Task) field.
IsExternalTask32Represents the IsExternalTask (Task) field.
IsSummary33Represents the IsSummary (Task) field.
ExternalTaskProject34Represents the ExternalTaskProject (Task) field.
ExternalId35Represents the ExternalId (Task) field.
EarlyStart36Represents the EarlyStart (Task) field.
EarlyFinish37Represents the EarlyFinish (Task) field.
LateStart38Represents the LateStart (Task) field.
LateFinish39Represents the LateFinish (Task) field.
StartVariance40Represents the StartVariance (Task) field.
FinishVariance41Represents the FinishVariance (Task) field.
WorkVariance42Represents the WorkVariance (Task) field.
CostVariance43Represents the CostVariance (Task) field.
FreeSlack44Represents the FreeSlack (Task) field.
TotalSlack45Represents the TotalSlack (Task) field.
StartSlack46Represents the StartSlack (Task) field.
FinishSlack47Represents the FinishSlack (Task) field.
FixedCost48Represents the FixedCost (Task) field.
FixedCostAccrual49Represents the FixedCostAccrual (Task) field.
PercentComplete50Represents the PercentComplete (Task) field.
PercentWorkComplete51Represents the PercentWorkComplete (Task) field.
Cost52Represents the Cost (Task) field.
OvertimeCost53Represents the OvertimeCost (Task) field.
ActualStart54Represents the ActualStart (Task) field.
ActualFinish55Represents the ActualFinish (Task) field.
ActualDuration56Represents the ActualDuration (Task) field.
ActualCost57Represents the ActualCost (Task) field.
ActualOvertimeCost58Represents the ActualOvertimeCost (Task) field.
ActualWork59Represents the ActualWork (Task) field.
ActualOvertimeWork60Represents the ActualOvertimeWork (Task) field.
OvertimeWork61Represents the OvertimeWork (Task) field.
RegularWork62Represents the RegularWork (Task) field.
RemainingDuration63Represents the RemainingDuration (Task) field.
RemainingCost64Represents the RemainingCost (Task) field.
RemainingWork65Represents the RemainingWork (Task) field.
RemainingOvertimeWork66Represents the RemainingOvertimeWork (Task) field.
RemainingOvertimeCost67Represents the RemainingOvertimeCost (Task) field.
ACWP68Represents the ACWP (Task) field.
CV69Represents the CV (Task) field.
SV70Represents the SV (Task) field.
ConstraintType71Represents the ConstraintType (Task) field.
Calendar72Represents the Calendar (Task) field.
ConstraintDate73Represents the ConstraintDate (Task) field.
Deadline74Represents the Deadline (Task) field.
LevelAssignments75Represents the LevelAssignments (Task) field.
LevelingCanSplit76Represents the LevelingCanSplit (Task) field.
LevelingDelay77Represents the LevelingDelay (Task) field.
PreleveledStart78Represents the PreleveledStart (Task) field.
PreleveledFinish79Represents the PreleveledFinish (Task) field.
Hyperlink80Represents the Hyperlink (Task) field.
HyperlinkAddress81Represents the HyperlinkAddress (Task) field.
HyperlinkSubAddress82Represents the HyperlinkSubAddress (Task) field.
IgnoreResourceCalendar83Represents the IgnoreResourceCalendar (Task) field.
HideBar84Represents the HideBar (Task) field.
IsRollup85Represents the IsRollup (Task) field.
BCWS86Represents the BCWS (Task) field.
BCWP87Represents the BCWP (Task) field.
PhysicalPercentComplete88Represents the PhysicalPercentComplete (Task) field.
EarnedValueMethod89Represents the EarnedValueMethod (Task) field.
ActualWorkProtected90Represents the ActualWorkProtected (Task) field.
ActualOvertimeWorkProtected91Represents the ActualOvertimeWorkProtected (Task) field.
IsPublished92Represents the IsPublished (Task) field.
IsScheduled93Represents the IsScheduled (Task) field.
StatusManager94Represents the StatusManager (Task) field.
CommitmentStart95Represents the CommitmentStart (Task) field.
CommitmentFinish96Represents the CommitmentFinish (Task) field.
CommitmentType97Represents the CommitmentType (Task) field.
IsManual98Represents the IsManual (Task) field.
IsExpanded99Represents the IsExpanded (Task) field.
Guid100Represents the Guid (Task) field.
NotesText101Represents the NotesText (Task) field.
NotesRTF102Represents the NotesRTF (Task) field.
ManualStart103Represents the ManualStart (Task) field.
ManualFinish104Represents the ManualFinish (Task) field.
ManualDuration105Represents the ManualDuration (Task) field.
BudgetWork106Represents the BudgetWork (Task) field.
BudgetCost107Represents the BudgetCost (Task) field.
DisplayAsSummary108Represents the DisplayAsSummary (Task) field.
SummaryProgress109Represents the Summary Progress (Task) field.
IsActive110Represents the IsActive (Task) field.
StartText111Represents the StartText (Task) field.
FinishText112Represents the FinishText (Task) field.
DurationText113Represents the DurationText (Task) field.
CalendarUid114Represents the CalendarUid (Task) field.
ParentTaskUid115Represents the ParentTaskUid (Task) field.
DisplayOnTimeline116Represents the DisplayOnTimeline (Task) field.
TaskIsAssigned117Represents the TaskIsAssigned (Task) field.
TaskOriginalStart118Represents the original start (Task) field.
TaskOriginalFinish119Represents the original finish (Task) field.
IsShowBeforeProjectStartDateWarning120Represents the flag which makes MSP show the warning that a task is starting before project start date.
Warning121Represents the flag which indicates that task has schedule discrepancies.
ParentTaskGuid122Represents the ParentTaskGuid (Task) field.
ActivityId123Represents the ActivityId field (only applicable to Primavera projects).
FreeSlackTimeSpan124Represents the FreeSlack (Task) field.
TotalSlackTimeSpan125Represents the TotalSlack (Task) field.
StartSlackTimeSpan126Represents the StartSlack (Task) field.
FinishSlackTimeSpan127Represents the FinishSlack (Task) field.
ExternalUid128Represents the Unique Id of external task.

Examples

Shows how to read/write task properties.

var project = new Project();

// Add task and set task properties
var task = project.RootTask.Children.Add();
task.Set(Tsk.Name, "Task1");
task.Set(Tsk.Start, new DateTime(2020, 3, 31, 8, 0, 0));
task.Set(Tsk.Finish, new DateTime(2020, 3, 31, 17, 0, 0));

var collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);

// Parse through all the collected tasks
foreach (var tsk in collector.Tasks)
{
    Console.WriteLine("Task Id: {0}", tsk.Get(Tsk.Id));
    Console.WriteLine("Task Uid: {0}", tsk.Get(Tsk.Uid));
    Console.WriteLine("Task Name: {0}", tsk.Get(Tsk.Name));
    Console.WriteLine("Task Start: {0}", tsk.Get(Tsk.Start));
    Console.WriteLine("Task Finish: {0}", tsk.Get(Tsk.Finish));
}

See Also