Update Tphase Process
Use the Update Tphase API process to update an individual Tphase (time-phase) period for a specified resource and date.
You can either add or overwrite the existing value.
Process Settings
Below are the settings you must define for the Update Tphase API process.
Setting | Description | Sample Value |
---|---|---|
ProcessID | This setting informs Cobra to run the Update Tphase process. | UpdateTphase |
UpdateTphaseFile | This setting refers to the full path and file name of the XML file containing the information that is updated in the Tphase table. If the path is not specified, the Start In directory is used. | C:\UpdateTPHASE.xml |
Update Tphase XML Structure
The Update Tphase XML file has the following structure:
<UpdateTphase>
<Project Name="xxx">
<CAWP Type="xx"></CAWP>
<BudgetElement></BudgetElement>
<CostClass></CostClass>
<Add></Add>
<Periods>
</Period>
<Date></Date>
<Quantity></Quantity>
</Period>
</Periods>
</UpdateTphase>
The following information is entered between the tags:
- <Project Name>: This is the name of the project. An error occurs if the project does not exist.
- <CAWPType>: This determines the format of the
<CAWP> tag values. Select one of the following options:
CA: Control Account
WP: Work Package
ID: CAWPID
- <CAWP>: This is the
CA,
WP, or
CAWPID value based on the <CAWPType> tag entry.
The CAWPID is a number based on the CAWPID value in Cobra. The CA and WP codes are in the form CA1 / CA2 / CA3 / WP.
For example, if you have a WBS and OBS code for a control account, the format would be 1.1.1.1 / 1200. A work package under this control account would be 1.1.1.1 / 1200 / 01.
An error occurs if the specified CA, WP or CAWPID does not exist.
- <BudgetElement>: This is the name of the resource you want to update. An error occurs if the resource does not exist in the project.
Note: The process loads to the base result on the resource, so there is no need to add a Result field to the XML file.
- <CostClass>: This is the cost class. An error occurs if the specified cost class does not exist in the project.
- <Add>: Enter one of the following values in this tag:
- 0: This value indicates that the Quantity replaces the existing value.
- 1: This value indicates that the Quantity is added to the existing period value.
If this option is omitted, the data is added to an existing entry by default.
- <Period>: This is repeated for each date and quantity being entered in the Tphase spread.
- <Date>: This is the date of the period to replace. The date must be either a calendar date, or the control account or work package finish date.
- <Quantity>: This is the numeric value that is entered into the Tphase period.
Sample Script
Below is a sample script file for an Update Tphase API process.
[Process001]
ProcessID=UpdateTphase
UpdateTphaseFile=C:\UpdateTPHASE.xml
Below is a sample Update Tphase XML file section.
<UpdateTphase>
<Project Name="Demo Advanced">
<CAWP Type="WP">1.1.2.2/1600/03</CAWP>
<BudgetElement>DRAFT</BudgetElement>
<CostClass>Budget</CostClass>
<Add>0</Add>
<Periods>
<Period>
<Date>12/31/2015</Date>
<Quantity>400.00</Quantity>
</Period>
<Period>
<Date>01/31/2016</Date>
<Quantity>300.50</Quantity>
</Period>
<Period>
<Date>02/28/2016</Date>
<Quantity>200</Quantity>
</Period>
<Period>
<Date>03/31/2016</Date>
<Quantity>100</Quantity>
</Period>
<Period>
<Date>04/15/2016</Date>
<Quantity>10.50</Quantity>
</Period>
</Periods>
</Project>
</UpdateTphase>