Examples of Changes to Configuration Properties
When creating a custom component by extending an out-of-the-box implementation, you may want to customize the configuration for your component. To do so, override the GetConfigurations service on your custom Thing Template with your own configuration, as described in the topic Create Custom Components. When you customize the configuration, changing the values of configuration properties is supported, whereas any change in the structure of the configuration, such as adding or removing fields, is not supported. In contrast, when creating a custom component by extending an out-of-the-box base component, changing the overall structure of the configuration JSON object is also supported
This topic provides examples of changes to configuration property values that do not change the overall configuration structure.
Changes to Configuration Property Values
We’ll use the Attributes component as an example to show the types of changes you can make to the configuration when you create a custom component by extending the Attributes Generic implementation. For more information on these configuration properties, see the configuration properties table in the topic Attributes. Let’s say we start with the sample configuration with a vertical layout from the topic Attributes Generic. Then we add the properties baseConfigurationVersion and implementationConfigurationVersion. These properties should always be added when overriding the GetConfigurations service. Here’s what the configuration looks like:
Initial Configuration for Attributes 
{
"baseConfigurationVersion":{
"value":"9.1.0"
},
"implementationConfigurationVersion":{
"value":"9.1.0",
"layout":{
"selectedKey":"vertical",
"additionalData":{
"isMultilineDefinition":{
"isMultiLine":{
"additionalData":{
"dimensionDefinition":{
"maxHeight":{
"version":"1.0.0",
"value":300
}
}
},
"version":"1.0.0",
"value":true
}
}
},
"version":"1.0.0"
},
"attributes":{
"sets":[
{
"data":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"Description",
"ordinal":0
},
{
"id":"ProposedSolution",
"ordinal":1
}
],
"objectType":"PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
},
"inTailoring":true,
"version":"1.0.0"
},
"name":""
}
],
"inTailoring":true,
"filteredValues":{
"data":[
{
"itemListsData":[
{
"objectType":""
}
],
"adapter":{
"instanceName":"",
"thingName":""
}
}
]
},
"version":"1.0.0"
}
}
}
Examples of Supported Changes
Here are some different types of changes you can make to the configuration:
Change individual property values: You can change the values for individual configuration properties, such as maxHeight, maxWidth, isMultiLine, id, ordinal, and others.
Add or remove attributes: You can change the number of attributes that appear in the user interface by changing the number of attributes under items.
Change the layout of the components: You can change the layout by changing the value for layout from vertical to horizontal, and then changing the sub-properties under layout, as described in the topic on the Attributes component.
To illustrate these changes, here’s a modified version of the configuration for Attributes which shows some of the supported changes:
Modified Configuration for Attributes 
{
"baseConfigurationVersion":{
"value":"9.1.0"
},
"implementationConfigurationVersion":{
"value":"9.1.0",
"layout":{
"selectedKey":"horizontal",
"additionalData":{
"dimensionDefinition":{
"maxHeight":{
"version":"1.0.0",
"value":150
},
"maxWidth":{
"version":"1.0.0",
"value":400
}
}
},
"version":"1.0.0"
},
"attributes":{
"sets":[
{
"data":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"Name",
"ordinal":0
},
{
"id":"Number",
"ordinal":1
},
{
"id":"Description",
"ordinal":2
},
{
"id":"LastModified",
"ordinal":3
}
],
"objectType":"PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
},
"inTailoring":true,
"version":"1.0.0"
},
"name":""
}
],
"inTailoring":true,
"filteredValues":{
"data":[
{
"itemListsData":[
{
"objectType":""
}
],
"adapter":{
"instanceName":"",
"thingName":""
}
}
]
},
"version":"1.0.0"
}
}
}
Was this helpful?