Creating a Revisable Regulatory Submission with Associated Table Data Objects
You can create a revisable regulatory submission with one or more table data objects associated to it. You can specify multiple types of table data along with multiple instances of the same table-data type.
 
While creating a revisable regulatory submission with multiple table data objects, each table data object is associated according to the association rules defined for the object.
Additionally, each table data object must adhere to its defined:
Association constraints
Attribute constraints
Cascading attribute rules
The following example shows you how to create two table data objects for a revisable regulatory submission as specified in the request body. The Cardinality specified for the first table data object is 1:1, and for the second table data object is 1:many.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/RegMstr/RegSubmission2
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"@odata.type": "#Ptc.RegMstr.RegSubmission2",
"Context@odata.bind": "PTC.DataAdmin.Containers('OR :wt.inf.library.WTLibrary: 260486')",
"Name": "testRegSub2",
"SubmittedTo@odata.bind": "Places('OR:com.ptc.qualitymanagement.masterdata.entity.MDEntity: 277481')",
"TableData": [
{
"@odata.type": "#Ptc.RegMstr.Subtype1",
"Context@odata.bind": "PTC.DataAdmin.Containers('OR:wt.inf.library.WTLibrary: 260486')",
"CustomAttribute1": "test1"
},
{
"@odata.type": "#Ptc.RegMstr.Subtype2",
"Context@odata.bind": "PTC.DataAdmin.Containers('OR:wt.inf.library.WTLibrary: 260486')",
"CustomAttribute2": "test2"
}
]
}
The request returns the two newly created table data objects for the revisable regulatory submission along with their details.
Example: Creating a Revisable Regulatory Submission with Different Types of Table Data Objects Associated to It
The following example shows you how to create a revisable regulatory submission with two different types of table data objects, that is, a base object and a subtype, associated to the regulatory submission. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/RegMstr/RegSubmission2
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"@odata.type": "#Ptc.RegMstr.RegSubmission2",
"Context@odata.bind": "PTC.DataAdmin.Containers('OR :wt.inf.library.WTLibrary: 260486')",
"Name": "testRegSub2",
"SubmittedTo@odata.bind": "Places('OR:com.ptc.qualitymanagement.masterdata.entity.MDEntity: 277441')",
"TableData": [
{
"@odata.type": "#PTC.RegMstr.TableData2"
},
{
"@odata.type": "#PTC.RegMstr.TDSubtype2"
}
]
}
The request creates a revisable regulatory submission along with the two table data objects that are associated to it according to the association rules defined for the objects.