AddRecord Functions
The following functions add a record to the specified table and return the record identifier:
AddRecord—Adds a record to the specified table.
AddRecordSession—Adds a record to the specified table using a session token returned by the GetSessionToken function.
AddRecordMultipleValues—Accepts a list of fields to read back from the record that you just added. This allows you to read out a record that user calculations or FRACAS lookups modified in only one step.
AddRecordMultipleValuesSession—Accepts a list of fields to read back from the record that you just added using a session token returned by the GetSessionToken function.
Syntax
The following is the syntax for an HTTP request:
POST /WindchillRiskandReliability12.0/DataEngine.asmx/AddRecord HTTP/1.1
Host: HostName
Content-Type: application/x-www-form-urlencoded
Content-Length: length

UserName=string&Password=string&GroupName=string&ProjectName=string&SystemName=string&Table=string&ParentIdentifier1=string&ParentIdentifier2=string&ParentIdentifier3=string
Parameters
The AddRecord and AddRecordMultipleValues functions use the login parameters for Windchill Risk and Reliability user accounts. The AddRecordSession and AddRecordMultipleValuesSession functions use the single login parameter for sessions. For more information, see Login Parameters.
In addition to login parameters, all AddRecord functions use these parameters:
ProjectName—The name of the Windchill Risk and Reliability Project. This value is case-sensitive.
SystemName—The name of the System file. This value is case-sensitive.
Table—The name of the Windchill Risk and Reliability table in which you want to add a record. This value is case-sensitive.
ParentIdentifier1—The identifier of the record that you want to add.
ParentIdentifier2—The second identifier of the record that you want to add.
ParentIdentifier3—The third identifier of the record that you want to add.
* 
ParentIdentifier values are not case-sensitive. The List Definitions and Configurations tables do not require any ParentIdentifier values. Only a few tables require ParentIdentifier2 and ParentIdentifier3 values. When values are required, the values differ for each table. For more information, see the following table.
Parent Identifier Values for Tables
Table
ParentIdentifier1
ParentIdentifier2
ParentIdentifier3
System Tree Items
The parent system tree item.
If inserting a part, set the value to true.
If inserting an assembly, leave this value blank. This value is not case-sensitive.
None
System Tree Items Subtable 1–15
The identifier of the parent configuration.
The identifier of the parent system tree item.
None
Problems Subtable 1-15
The identifier of the parent problem.
None
None
FRACAS Incidents
The identifier of the parent configuration.
The identifier of the parent system tree item. This value is not case-sensitive.
None
FRACAS Incidents Subtable 1-15
The identifier of the parent incident.
None
None
FRACAS Operating Times
The identifier of the parent configuration.
None
None
FRACAS Maintenance Logs
The identifier of the parent incident.
None
None
FMEA Tree Items
The parent FMEA tree item.
If inserting a part, set the value to true.
If inserting an assembly, leave this value blank. This value is not case-sensitive.
None
FMEA Tree Subtables
The identifier of the FMEA.
The parent FMEA tree item. This value is not case-sensitive.
None
FMEA Table
Enter Process, Functional, or Component to create that type of FMEA.
Configuration identifier, required for Component, optional for Functional to copy that system tree, and not used for Process.
Not used
FMEA Worksheet
The data level for the record to insert. The value can be one of the following:
Item
Mode
Cause
Effect
Action
If custom labels are assigned to data levels in the properties for the Project’s FMEA Design file, you can also use these values.
The identifier of the parent record.
For an item, the identifier is that of the parent FMEA Tree Items record.
For a mode, cause, effect, or action, the identifier is that of the parent FMEA Worksheet record.
The identifier of the associated FMEA Table record. This value is only required when you are inserting a new item into a component FMEA and the Configurations table is enabled.
The item is inserted into the FMEA Worksheet table at the appropriate level. The API does not insert child records for this data level. This occurs only when the item is inserted in the System file.
For example, assume that the Item>Mode>Cause>Effect data structure is in use. When a mode is inserted directly in the System file, a cause and effect are also inserted. The API does not insert child records for the mode.
FMEA Control Plans
When you insert a record for a control plan or a DVP, you can automatically link it to an FMEA Tree record or FMEA Worksheet record. You can also link it to records in both tables.
To connect it to an FMEA Tree record:
ParentIdentifier1 is the identifier of the FMEA Table record.
ParentIdentifer2 is the identifier of the FMEA Tree Items record.
To connect it to an FMEA Worksheet record:
ParentIdentifer3 is the identifier of the FMEA failure mode cause or the mode itself, depending on the FMEA design structure for the Project.
You can link a new control plan or DVP to a record in either FMEA table. If you are linking to a record in only one of these tables, then you leave the other fields blank.
FMEA Control Plans Subtable 1–15
The identifier of the parent control plan.
None
None
FMEA DVPs
Parent identifiers for DVPs are the same as for FMEA control plans.
FMEA DVPs Subtable 1–15
The identifier of the parent DVP.
None
None
FTA Table
The identifier of the parent record to which you want to add a new gate or event.
If a record with the specified identifier is not found, an error is returned.
If no identifier is specified, a new top gate is inserted.
The type of gate or event that you want to add. The name of the gate or event comes from the list of gates and events for the current, server-specified language.
If no type is specified, a basic event is added.
If an invalid type is specified, an error is returned. Examples include:
You cannot add any event types as a new Top Gate.
You cannot add a Sequencing AND Gate to a Time Dependent diagram.
You cannot add a Spare Event to anything other than a Spare Gate.
For a transfer gate, the identifier of the top gate from which you are transferring.
For a repeated event, the identifier of the event that you want to repeat.
If you specify an invalid record (such as a gate), an error is returned.
The event type of the event that is being repeated is used instead of the gate/event type specified in ParentIdentifier2.
List Choices
The Display text of the list definition to which you want to add a list choice.
None
None
List Definitions
None
None
None
Configurations
None
None
None
* 
When a record is inserted in the List Definition table, Code and Display text are automatically generated as LIST N and LIST N. When a record is inserted in the List Choice table, the Code and Display text are automatically generated as CHOICE N and CHOICE N. In both cases, N represents the next available integer that allows for a unique code or display text value.
The following is an example of an HTTP POST request:
POST /WindchillRiskandReliability12.0/DataEngine.asmx/AddRecord HTTP/1.1
Host: vm-test
Content-Type: application/x-www-form-urlencoded
Content-Length: length

UserName=Bill&Password=b3am3r&GroupName=Manager&ProjectName=Tablet PC &SystemName=Tablet PC&Table=Configurations&ParentIdentifier1=Configuration1 &ParentIdentifier2=Production Site
Returns
If the user is authenticated and the specified parameter values are found, the identifier of the inserted record is returned.
<?xml version="1.0" encoding="utf-8"?>
<DataEngineResponse xmlns="http://tempuri.org/">
<Success>true</Success>
<AdditionalData>Configuration2</AdditionalData>
</DataEngineResponse>
If the call fails, the AdditionalData tag provides the reason for the failure.
Specifying Multiple Values
The AddRecordMultipleValues and AddRecordMultipleValuesSession functions are among those that use the FieldList parameter to specify multiple fields. For this function, you can update only one table at time. For more information, see Multiple Field Requests.