Creating Table-Data Details for an Existing Non-revisable Regulatory Submission
To create a table-data type and its attributes for an existing non-revisable regulatory submission, you must have Modify permissions to the regulatory submission.
In a single call, you can also create:
Different types of table data.
Multiple instances of the same type of table data.
 
The specified table-data type must be instantiable.
The attributes that are defined with a "Required" constraint in Windchill must be specified in the request.
Each table data attribute must adhere to its defined:
Attribute constraints
Cascading attribute rules
The following example shows you how to create a table data subtype along with two attributes for a non-revisable regulatory submission. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/RegMstr/RegulatorySubmissions('OR:com.ptc.qualitymanagement.regmstr.RegulatorySubmission:269686')/TableData
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"@odata.type": "#PTC.RegMstr.SampleTableData",
"TDString": "test",
"TDInteger": 12
}
The request creates the SampleTableData subtype object along with its two attributes, TDString and TDInteger, for the specified regulatory submission.
Example: Creating Different Types of Table Data Using a Batch Request
The following example shows you how to create different types of table data and their attributes for a non-revisable regulatory submission. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/RegMstr/$batch
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body: Raw, Text
--batch_12345
Content-Type: application/http
Content-Transfer-Encoding: binary

POST /Windchill/servlet/odata/RegMstr/RegulatorySubmissions('OR:com.ptc.qualitymanagement.regmstr.RegulatorySubmission:272180')/TableData
Content-Type: application/json

{
"@odata.type":"#PTC.RegMstr.SampleTableData",
"TDString":"testSampleTableData",
"TDInteger":124
}


--batch_12345
Content-Type: application/http
Content-Transfer-Encoding: binary

POST /Windchill/servlet/odata/RegMstr/RegulatorySubmissions('OR:com.ptc.qualitymanagement.regmstr.RegulatorySubmission:272180')/TableData
Content-Type: application/json

{
"@odata.type":"#PTC.RegMstr.TableDataSub",
"TDString":"testTableDataSub",
"TDInteger":125
}


--batch_12345--
The request creates two different table-data types, SampleTableData and TableDataSub, along with two attributes for each.
Example: Creating Multiple Instances of the Same Type of Table Data Using a Batch Request
The following example shows you how to create multiple instances of the same type of table data and their attributes for a non-revisable regulatory submission. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/RegMstr/$batch
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body: Raw, Text
--batch_12345
Content-Type: application/http
Content-Transfer-Encoding: binary

POST /Windchill/servlet/odata/RegMstr/RegulatorySubmissions('OR:com.ptc.qualitymanagement.regmstr.RegulatorySubmission:272180')/TableData
Content-Type: application/json

{
"@odata.type":"#PTC.RegMstr.TableDataSub",
"TDString":"testTableDataSub",
"TDInteger":124
}


--batch_12345
Content-Type: application/http
Content-Transfer-Encoding: binary

POST /Windchill/servlet/odata/RegMstr/RegulatorySubmissions('OR:com.ptc.qualitymanagement.regmstr.RegulatorySubmission:272180')/TableData
Content-Type: application/json

{
"@odata.type":"#PTC.RegMstr.TableDataSub",
"TDString":"testTableDataSub",
"TDInteger":124
}


--batch_12345--
The request creates two instances of the same table-data type, TableDataSub, along with the two attributes for each.