添付資料
添付資料は、添付資料を表示するアイテムリストコンポーネントの定義済みコンフィギュレーションです。添付資料には、アイテムリストと同様に、サーチ、並べ替え、フィルタ、エクスポート、およびデフォルトに戻す機能があります。「エクスポート」操作はデフォルトでは含まれていませんが、コンフィギュレーションを介して有効にできます。添付資料には、特定の変更リクエストの添付資料が表示されます。添付資料には、添付資料ごとに、コンフィギュレーションを介して選択可能な属性が表示されます。
デフォルトの属性は、「名前」、「ファイルサイズ」、「説明」、「最終修正日」、「修正者」、「外部の場所」です。名前属性には、ThingWorx Navigate 9.3.0 以前のバージョンではファイル名属性によって表示されていた値が表示されます。名前にはファイルタイプも表示されます。名前をクリックすると、添付資料をダウンロードしたり、リンクされている Web ページに移動したりできます。名前属性がコンフィギュレーションまたは調整を介して除去される場合、ダウンロードリンクは使用できません。次のイメージに示すように、ファイル名属性には、ファイルの名前のみが表示されます。
「添付資料」定義済みコンフィギュレーションのサンプルイメージを以下に示します。
添付資料には、アイテムリストと同様に、サーチ、並べ替え、フィルタ、エクスポート、およびデフォルトに戻す機能があります。「エクスポート」操作はデフォルトでは含まれていませんが、コンフィギュレーションを介して有効にできます。
バインドプロパティ 
添付資料のバインドについては、アイテムリストコンポーネントを参照してください。
* 
添付資料の場合、入力バインドプロパティで PTC.Workflow.WorkItem および PTC.ChangeMgmt.ChangeRequest のオブジェクトタイプがサポートされています。
selectedItems バインドプロパティの出力には、PTC.ContentItem オブジェクトタイプのアイテムが含まれています。
コンフィギュレーションプロパティ 
添付資料の設定については、アイテムリストコンポーネントを参照してください。
コンフィギュレーションの構造の詳細については、コンポーネントのコンフィギュレーション構造を参照してください。
サブプロパティの詳細については、サブプロパティとコンテナキーを参照してください。
プロパティ名
説明
プロパティタイプ
デフォルト値
必須またはオプション
attributes
詳細については、アイテムリストを参照してください。
PTC.ContentItem オブジェクトタイプの属性を受け入れます。
なし
必須
defaultSortField
詳細については、アイテムリストを参照してください。
PTC.ContentItem オブジェクトタイプの属性を受け入れます。
なし
オプション
filterFields
詳細については、アイテムリストを参照してください。
PTC.ContentItem オブジェクトタイプの属性を受け入れます。
なし
オプション
showImplementationActions
このプロパティに attachmentsDownloadAllAsZip キーが含まれている場合、「添付資料」の埋め込み操作バーに「すべてダウンロード」ボタンが含まれるので、これによりユーザーはすべての添付資料をダウンロードできます。
添付資料によってサポートされているこのプロパティの値は attachmentsDownloadAllAsZip のみです。
なし
オプション
サンプルコンフィギュレーション 
{
"attachments":{
"configuration":{
"attributes":{
"inTailoring":true,
"selectedValues":{
"data":[
{
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
},
"itemListsData":[
{
"items":[
{
"id":"PTC.ApplicationData/FileSize",
"ordinal":1
},
{
"id":"Description",
"ordinal":2
},
{
"id":"LastModified",
"ordinal":3
},
{
"id":"ModifiedBy",
"ordinal":4
},
{
"id":"PTC.ExternalStoredData/ExternalLocation",
"ordinal":5
}
],
"objectType":"PTC.ContentItem"
},
{
"items":[
{
"id":"Name",
"ordinal":0
}
],
"objectType":"PTC.Nav.Attachments.Custom.Implementation"
}
]
}
]
}
},
"implementationConfiguration":{
"value":{
"downloadFileName":{
"selectedValues":{
"data":[
{
"itemListsData":[

],
"adapter":{

}
}
]
},
"pattern"<fileName>.<ext>"
}
}
},
"defaultSortFields":{
"selectedValues":{
"data":[
{
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
},
"itemListsData":[
{
"items":[
{
"additionalData":{
"itemListDefaultSortFieldDefinition":{
"defaultSortDirection":{
"selectedKey":"asc"
}
}
},
"id":"Name"
}
],
"objectType":"PTC.Nav.Attachments.Custom.Implementation"
}
]
}
]
}
},
"enableSearch":{
"additionalData":{
"itemListSearchDefinition":{
"searchHintText":{
"value":"[[PTC.Nav.Attachments.FindHintText]]"
}
}
},
"value":true
},
"actionBarConfiguration":{
"value":{
"actionBarConfigurationJSON":{
"value":""
}
}
},
"label":{
"value":"[[PTC.Nav.Attachments.UILabel]]"
},
"maxNumberOfRowsInGrid":{
"inTailoring":true,
"value":50
},
"selectionType":{
"selectedKey":"none"
},
"showExportAction":{
"value":false
},
"waitForInput":{
"value":true
},
"baseConfigurationVersion":{
"value":"nav.3"
},
"implementationConfigurationVersion":{
"value":"nav.2"
}
},
"label":"[[PTC.Nav.Attachments.ConfigurationLabel]]"
}
}
カスタマイズサービス 
コンフィギュレーションに加え、コンポーネントごとにビジネスロジックを拡張してコンポーネントをカスタマイズできます。各コンポーネントのビジネスロジックには、拡張およびオーバーライド可能な Thing Template 内のサービスが含まれています。次のテーブルは、このコンポーネントのオーバーライド可能なサービスの詳細を示しています。
各サービスの戻り値とパラメータの例については、カスタマイズサービスの入力/出力の例を参照してください。
名前
説明
GetConfigurations
添付資料で使用可能なコンフィギュレーションを返します。
パラメータ: なし
戻り値: JSON
GetImplementationLabel
コンポーネントのローカライズ名、またはローカライズ名を取得するために使用できるトークンを返します。このローカライズ名は Mashup Builder のユーザーインタフェースに表示されます。
パラメータ: なし
戻り値: String
GetImplementationSettings
「すべてダウンロード」ボタンのデータを含む設定データを返します。
パラメータ: なし
戻り値: JSON
GetItems
入力で指定された変更リクエストアイテムに対する添付資料を返します。
パラメータ:
input (オプション) - バックエンドシステムからフェッチするデータの入力 ID およびバックエンドシステムのアダプタ情報を含む、CCOフォーマットの JSON。
configuration (必須) - 調整マネージャリソースから取得した最終マージコンフィギュレーションを含む JSON。
戻り値: CCOフォーマットの JSON
DefHookGetImplementationActionsList
GetImplementationSettings サービスの implementationActions キーの下にリストされている操作を返します。
パラメータ: なし
戻り値: JSON 配列
DefHookMaxRowsProperties
グリッド領域に表示される行の最大数のプロパティを返します。
パラメータ: なし
戻り値: JSON
実装定義 
{
"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"
}
]
}
},
"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":{
"options":[
{
"label":"1",
"key":"1"
},
{
"label":"2",
"key":"2"
},
{
"label":"3",
"key":"3"
},
{
"label":"4",
"key":"4"
},
{
"label":"5",
"key":"5"
},
{
"label":"6",
"key":"6"
},
{
"label":"7",
"key":"7"
},
{
"label":"8",
"key":"8"
},
{
"label":"9",
"key":"9"
},
{
"label":"-1",
"key":"-1"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Dropdown"
},
"mandatory":false,
"key":"defaultExpansionLevel"
},
{
"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.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.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":{

}
},
"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":false,
"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":[
{
"directDefinition":[
{
"property":{
"options":[
[
{
"label":"[[PTC.Nav.ItemList.ExportCSVActionLabel]]",
"key":"exportToCsv"
},
{
"label":"[[PTC.Nav.ItemList.ExportCSVAsExcelActionLabel]]",
"key":"exportToExcel"
}
]
]
},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":"",
"overflow":null,
"minimumSelectedItems":null,
"options":[

],
"updateServiceName":null,
"addServiceName":null,
"constraints":{

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

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

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

],
"label":null
},
"false":{
"additionalDefinition":[

],
"label":null
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"exportUnFilteredData"
}
],
"key":"itemListExportDefinition"
}
],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

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

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

},
"properties":{
"listLabel":null,
"showFilter":false,
"minimumSelectedItems":0,
"showDropDown":false,
"options":[
{
"label":"[[PTC.Nav.Drawings.DownloadAll]]",
"key":"attachmentsDownloadAllAsZip"
}
],
"updateServiceName":null,
"addServiceName":null,
"showClearSelectedItems":false,
"dropDownLabel":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.List"
},
"mandatory":false,
"key":"showImplementationActions"
},
{
"property":{

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

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

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

],
"label":"[[PTC.Nav.No]]"
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"waitForInput"
}
]
}
これは役に立ちましたか?