How Core Fields are populated on Upload from P6

Modified on Mon, 22 Dec at 11:13 AM

TABLE OF CONTENTS



Introduction

If you make a Config using a Template with no ILAP Terms, the "standard" fields of a schedule will automatically be transferred during an upload (according to the new Schedule Data Ontology - SDO).

This article describes the logic by which the Core field name is populated, on upload) from a Formula that resembles the actual source code used. It is applied relative to the various API response fields in P6 (note that the highlighted words correspond with column names in tables below). 

There will be a table for each Planning Object Type (Schedule, Activity, Resource Assignment, Successor, and Calendar).

The logic can be "reversed" to deduce how the download process behaves.


Note that all the Core Fields for Schedule, Activity and Resource Assignments can be overridden by mappings in Config.


Schedule Core Fields

Core field nameApi response fieldFormula
DescriptionNameDescription = Name
CompletedDateFinishDateCompletedDate = FinishDate
StartedDateStartDateStartedDate = StartDate
CurrentProgress(not applicable)
CutoffDateDataDateCutoffDate = DataDate
CodeIdCode = Id


The unique value for the internal HostObjectId field, is derived from: 
schedule.ObjectId


Activity Core Fields

Core field nameApi response fieldFormula
ActivityType
3 = RegularActivity
4 = MilestoneStart
5 = MilestoneFinish
6 = Hammock
8 = ResourceDependent
 10 = WbsSummary
Type
0 = TaskDependent
1 = ResourceDependent
2 = LevelofEffort
3 = StartMilestone
4 = FinishMilestone
 5 = WBSSummary
if Type == 4 return 5
if Type == 3 return 4
if Type == 2 return 6
if Type == 1 return 8
if Type == 0 return 3
if Type == 5 return 10
 return 3
DescriptionNameDescription = Name
FinishAsEarlyAsPossible

FinishNoLaterThanPrimaryConstraintType,
 PrimaryConstraintDate
if PrimaryConstraintType == 5(FinishOnorBefore)
return PrimaryConstraintDate
MustFinishOnPrimaryConstraintType,
 PrimaryConstraintDate
if PrimaryConstraintType == 4(FinishOn) ||
PrimaryConstraintType == 9(MandatoryFinish) ||
PrimaryConstraintType == 6(FinishOnorAfter) ||
return PrimaryConstraintDate
MustStartOnPrimaryConstraintType,
 PrimaryConstraintDate
if PrimaryConstraintType == 1(StartOn) ||
PrimaryConstraintType == 8(MandatoryStart)
return PrimaryConstraintDate
StartAsEarlyAsPossiblePrimaryConstraintTypeif PrimaryConstraintType IS NOT IN (4,9,1,8,7,3,2,5,6)
StartAsLateAsPossiblePrimaryConstraintTypeif PrimaryConstraintType == 7(AsLateAsPossible)  return true
StartNoEarlierThanPrimaryConstraintType,
 PrimaryConstraintDate
if PrimaryConstraintType == 3(StartOnorAfter)
return PrimaryConstraintDate
StartNoLaterThanPrimaryConstraintType,
 PrimaryConstraintDate
if PrimaryConstraintType == 2(StartOnorBefore)
return PrimaryConstraintDate
ActualFinishActualFinishDateActualFinish = ActualFinishDate
ActualStartActualStartDateActualStart = ActualStartDate
ActualWorkHoursActualUnitsActualHours = ActualUnits
CurrentProgressPercentCompletePercentComplete.Value * 100.0
EarlyStartEarlyStartDateEarlyStart = EarlyStartDate
EarlyFinishEarlyFinishDateEarlyFinish = EarlyFinishDate
LateFinishLateFinishDateLateFinish = LateFinishDate
LateStartLateStartDateLateStart = LateStartDate
FreeFloatHoursFreeFloatFreeFloatHours = FreeFloat
TotalFloatHoursTotalFloatTotalFloatHours = TotalFloat
PlannedWorkHoursPlannedLaborUnitsPlannedWorkHours = PlannedLaborUnits
RemainingWorkHoursRemainingLaborUnitsRemainingWorkHours = RemainingLaborUnits
IsAlwaysOnScheduleAutoComputeActualsIsAlwaysOnSchedule = AutoComputeActuals
IsCancelled(not applicable)
CancelledDate(not applicable)
PlannedProgressSchedulePercentCompleteSchedulePercentComplete * 100 ?? 0
DurationHoursPlannedDurationDurationHours = PlannedDuration
RemainingDurationHoursRemainingDurationRemainingDurationHours = RemainingDuration
FinishOnOrAfter

FrontLineDate

CodeIdCode = Id
CalendarCalendarObjectId,
 exportedCalendars
exportedCalendars
 .FirstOrDefault(v => string.Equals(v.Code, CalendarObjectId.ToString()))


The unique value for the internal HostObjectId field, is derived from: 
schedule.ObjectId|activity.ObjectId


Resource Assignment Core Fields

Core field nameApi response fieldFormula
PlannedHoursPlannedUnitsPlannedHours = PlannedUnits
ActualHoursActualUnitsActualHours = ActalUnits
CurrentProgressUnitsPercentComplete,
 PendingPercentComplete
if PendingPercentComplete.HasValue
return PendingPercentComplete.Value * 100.0
return UnitsPercentComplete.HasValue ? Convert.ToDouble(UnitsPercentComplete.Value * 100.0) : null
ResourceUsageType
2 (ResourceUsageType.StaffTime)
CodeObjectIdCode = ObjectId
ProfileResourceCurveObjectIdSpecified,
 ResourceCurveObjectId
get profile where profile.Code = ResourceCurveObjectId
ResourceResourceObjectIdcheck if any resource's object id matched resourceUsage.ResourceObjectId
EarlyStartPlannedStartDateEarlyStart = PlannedStartDate
EarlyFinishPlannedFinishDateEarlyFinish = PlannedFinishDate
LagHoursPlannedLagLagHours = PlannedLag
DurationHoursPlannedDurationDurationHours = PlannedDuration


The unique value for the internal HostObjectId field, is derived from: 
schedule.ObjectId|activity.ObjectId|resourceassignment.ObjectId



Successor Core Fields

Core field nameApi response fieldFormula
Type
StartToStart = 0,
StartToFinish = 1,
FinishToStart = 2,
 FinishToFinish = 3,
activityLink.link_type
StartToStart = 2,
StartToFinish = 3,
FinishToStart = 0,
FinishToFinish = 1
if activityLink.link_type == 2 return 0
if activityLink.link_type == 3 return 1
if activityLink.link_type == 0 return 2
return 3
Code
activity.Code|successorLink.ObjectId
Calendar
Calendar will be chosen based on Schedule's setting:
LagHoursLagLagHours = Lag


The unique value for the internal HostObjectId field, is derived from: 
schedule.HostObjectId|successorLink.ObjectId



Calendar Core Fields

Core field nameApi response fieldFormula
DescriptionNameif duplicateCalendar return $"{calendarDto.Description}_{renameSuffix}"
 return Description

IsPersonal"false"

IsTemplate"false"

TypeCalendarType.Project

HoursPerWeektotalWorkingHoursInWeek

HoursPerMonthtotalWorkingHoursInWeek*4

HoursPerYeartotalWorkingHoursInWeek*52

StandardWorkWeekprimaveraWStandardWeek.ToArray()
HoursPerDayHoursPerDayif (calendarDto.HoursPerDay > 0)
{
HoursPerDay = calendarDto.HoursPerDay;
}
else
{
HoursPerDay = maximumDailyWorkingHour;
 }


The unique value for the internal HostObjectId field, is derived from: 
ObjectId


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article