Attachments
Attachments is a predefined configuration of the Item List component that displays attachments. Attachments shows attachments for specific change requests. For each attachment, Attachments displays attributes which you can choose via configuration. The default attributes are Filename, Filesize, Description, Last Modified, Modified By, and External Location. The filename also shows the file type. You can click a filename to download the attachment or navigate to the linked webpage. If the filename attribute is removed via configuration or tailoring, there’s no download link available.
Attachments has similar search, sort, filter, export, and restore defaults capabilities as Item List. The Export action isn’t included by default, but can be enabled via configuration.
The following is a sample image showing the Attachments predefined configuration:
Binding Properties 
For information on binding Attachments, see the Item List component.
* 
For Attachments, the input binding property supports the PTC.Workflow.WorkItem and PTC.ChangeMgmt.ChangeRequest object types.
The output of the selectedItems binding property contains items with the PTC.ContentItem object type.
Configuration Properties 
For information on configuring Attachments, see the Item List component.
Property Name
Description
Property Type
Default Value
Required or Optional
attributes
See Item List for more information.
Accepts attributes of the PTC.ContentItem object type.
N/A
Required
defaultSortField
See Item List for more information.
Accepts attributes of the PTC.ContentItem object type.
N/A
Optional
filterFields
See Item List for more information.
Accepts attributes of the PTC.ContentItem object type.
N/A
Optional
Sample Configuration 
{
"selectionType": {
"selectedKey": "none"
},
"waitForInput": {
"value": true
},
"actionBarConfiguration": {
"value": {
"actionBarConfigurationJSON": {
"value": ""
}
}
},
"defaultSortFields": {
"selectedValues": {
"data": [
{
"itemListsData": [
{
"items": [
{
"additionalData": {
"itemListDefaultSortFieldDefinition": {
"defaultSortDirection": {
"selectedKey": "asc"
}
}
},
"id": "FileName"
}
],
"objectType": "PTC.ContentItem"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
}
},
"attributes": {
"selectedValues": {
"data": [
{
"itemListsData": [
{
"items": [
{
"id": "FileName",
"ordinal": 0
},
{
"id": "FileSize",
"ordinal": 1
},
{
"id": "Description",
"ordinal": 2
},
{
"id": "LastModified",
"ordinal": 3
},
{
"id": "ModifiedBy",
"ordinal": 4
},
{
"id": "ExternalLocation",
"ordinal": 5
}
],
"objectType": "PTC.ContentItem"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"inTailoring": true
},
"label": {
"value": "[[PTC.Nav.Attachments.UILabel]]"
},
"showExportAction": {
"value": false
},
"enableSearch": {
"additionalData": {
"itemListSearchDefinition": {
"searchHintText": {
"value": "[[PTC.Nav.Attachments.FindHintText]]"
}
}
},
"value": true
},
"maxNumberOfRowsInGrid": {
"inTailoring": true,
"value": 50
}
}
Customization Services 
In addition to configuration, each component supports extending its business logic to customize the component. The business logic of each component includes overridable services in a Thing Template that you can extend and override. The overridable services for this component are detailed in the following table.
For examples of returns and parameters for each service, see Examples of Input/Output for Customization Services.
Name
Description
GetConfigurations
Returns the available configurations for Attachments.
Parameters: None
Returns: JSON
GetImplementationLabel
Returns either the localized name of the component or the token that can be used to obtain the localized name. This localized name is displayed in the Mashup Builder user interface.
Parameters: None
Returns: String
GetItems
Returns the attachments for the change request item specified in the input.
Parameters:
input (Optional)– JSON in CCO format that includes the input ID for the data to be fetched from the backend system and the adapter information for the backend system.
configuration (Required)– JSON with the final merged configuration obtained from the Tailoring Manager resource.
Returns: JSON in CCO format
DefHookMaxRowsProperties
Returns the properties for the maximum number of rows to display in the grid area.
Parameters: None
Returns: JSON
Implementation Definition 
{
"array":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"actionBarConfigurationJSON"
}
],
"componentDefinition":{
"thingName":null,
"allowSelection":false
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory":false,
"key":"actionBarConfiguration"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"fieldTitleOverride"
}
],
"key":"itemListAttributesDefinition"
},
{
"directDefinition":[

],
"key":"implementationAttributesDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":null,
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"ATT"
],
"objectType":"PTC.ContentItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":true,
"key":"attributes"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"Sort column in ascending order",
"label":"[[PTC.Nav.ItemList.SortOrder.Asc]]",
"key":"asc"
},
{
"description":"Sort column in descending order",
"label":"[[PTC.Nav.ItemList.SortOrder.Dsc]]",
"key":"dsc"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"defaultSortDirection"
}
],
"key":"itemListDefaultSortFieldDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":null,
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"ATT"
],
"objectType":"PTC.ContentItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":false,
"key":"defaultSortFields"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"searchHintText"
}
],
"key":"itemListSearchDefinition"
}
],
"label":"[[PTC.AccessApp.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.AccessApp.No]]"
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"enableSearch"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"dynamicallySetTypeServiceName":"GetFilterTypeDefinitionForFilterField",
"type":{
"enum":{
"options":[

],
"updateServiceName":null,
"dynamicallySetOptionsServiceName":null,
"addServiceName":null,
"multiSelect":null
}
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.FieldFilter"
},
"mandatory":false,
"key":"defaultSelectedFilterValues"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"filterLabelOverride"
}
],
"key":"itemListFilterFieldDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":0,
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"ATT"
],
"objectType":"PTC.ContentItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":1
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":false,
"key":"filterFields"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"directDefinition":[

],
"componentDefinition":{
"thingName":null,
"allowSelection":false
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory":false,
"key":"implementationConfiguration"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"label"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"minValue":1,
"default":50,
"maxValue":500,
"step":10
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Number"
},
"mandatory":true,
"key":"maxNumberOfRowsInGrid"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"Disallow items selection",
"label":"[[PTC.Nav.ItemList.SelectionType.None]]",
"key":"none"
},
{
"description":"Allow single item selection",
"label":"[[PTC.Nav.ItemList.SelectionType.Single]]",
"key":"single"
},
{
"description":"Allow multiple items selection",
"label":"[[PTC.Nav.ItemList.SelectionType.Multiple]]",
"key":"multi"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"selectionType"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[

],
"label":"[[PTC.AccessApp.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.AccessApp.No]]"
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"showExportAction"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":false,
"true":{
"additionalDefinition":[

],
"label":"[[PTC.AccessApp.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.AccessApp.No]]"
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"waitForInput"
}
]
}
Was this helpful?