Multiple Field Requests
Requests Where You Specify Multiple Fields
The following functions allow you to specify multiple Windchill Risk and Reliability fields in your requests:
AddRecordMultipleValues
AddRecordMultipleValuesSession
CreateExportXMLCustom
CreateExportXMLCustomSession
EditRecordMultipleValues
EditRecordMultipleValuesSession
ReadRecordMultipleValues
ReadRecordMultipleValuesSession
EditLookupRecordMultipleValues
EditLookupRecordMultipleValuesSession
ReadLookupRecordMultipleValues
ReadLookupRecordMultipleValuesSession
Each of these functions has an additional FieldList parameter. This parameter is defined as DataEngineField[]. The brackets indicate that the parameter is an array of DataEngineFields. You can specify as many DataEngineFields as you want. A DataEngineField consists of two strings:
FieldName—The name of the field that you want to request.
TableName—The name of the table where the field is located.
For example, assume that you want to read values, edit values, or export XML for multiple fields in the FRACAS Incidents table. You would add a number of incident fields to your array of DataEngineFields, such as Incident Identifier and Closed.
Additionally, you can add fields from other tables for all but the EditRecordMultipleValues function. This includes fields from parent tables. For example, assume that you are making a FRACAS Incidents request. You can add the Name field from the System Tree Items table and the Site field from the Configurations table. For the EditRecordMultipleValues function, you can update the fields in only one table at a time.
You still pass in a single table parameter, just as you do when requesting values from one table. When you want to return values from fields in multiple tables, you must specify the most subordinate table for the table parameter. For example, a FRACAS Incidents request with FRACAS Incidents fields is successful because only one system tree item can exist for each incident. However, a System Tree Items request with FRACAS Incidents fields results in an error because many incidents are possible for each system tree item.
Some API functions support specifying multiple fields from multiple tables. For these functions, you can use one call to retrieve all the information that you want from all related tables. For example, assume that you want to retrieve data from the following tables: FRACAS Incidents, System Tree Items, and Configurations. You do not have to worry about having multiple Name fields on different tables. This is because you explicitly say that you want the Name field from the System Tree Items table.
Requests Where you Receive Back Multiple Field Values
The following functions allow you to retrieve data for multiple fields from your requests:
AddRecordMultipleValues
AddRecordMultipleValuesSession
EditRecordMultipleValues
EditRecordMultipleValuesSession
ReadRecordMultipleValues
ReadRecordMultipleValuesSession
ReadLookupRecordMultipleValues
ReadLookupRecordMultipleValuesSession
You can retrieve data from the edited or created record in one step to know if user calculations or lookup values changed the record.
Each of these functions returns a response of type DataEngineFieldValueListResponse, which contains a Fields property of type DataEngineFieldValue[]. This array is of type DataEngineFieldValue, which contains two strings:
FieldName—The name of the field that you requested.
Value—The data value for the field.
This response array is in the same order as the DataEngineField[] passed into the FieldList parameter. The FieldName property response is exactly what is passed in for FieldName in the FieldList parameter for the request. The Value property is filled in with the data requested.