Customize ThingWorx Navigate > Create Custom Tasks > Use ThingWorx Navigate Components in a Custom Task > Configure Components > Component Configuration Structure
  
Component Configuration Structure
The configuration for each component is written in JSON format and is made up of many configuration properties. There are many different types of configuration properties— for example, a property may define something simple, such as a string, integer, or Boolean, or something more complex, such as a list of items to return from the backend system. Each type of property has a different internal JSON structure. Understanding the property types and their structures will help you configure your components effectively.
Some properties have multiple configuration options, and when you choose one of the options, the property has a sub-property that you can use to further configure the component. Note that these sub-properties are not shown in the structures or examples listed below, because they vary. For more information, see Sub-Properties and Container Keys.
* 
Each of the properties below can include the inTailoring key with a Boolean value. This key can be used only in cases where there is a dedicated tailoring page for your custom task.
Textbox
Name: PTC.Nav.DynamicForm.Textbox
Description: Text string. Used primarily for labels.
Structure:
{
"value": "content of label"
}
Example of a textbox from the progressBarMessage key in Task Progress:
{
"value":"[[PTC.Nav.TaskProgress.ProgressBarMessage]]"
}
Toggle
Name: PTC.Nav.DynamicForm.Toggle
Description: The value is one of two options. Options are true and false.
Structure:
{
"value": true
}
Example of a toggle from the showImage key in Item Identity:
{
"value":false
}
Number
Name:PTC.Nav.DynamicForm.Number
Description: Number.
Structure:
{
"value": 500
}
Example of a number from the maxTileCount key in Tiles:
{
"":{
"value":"5"
}
}
Mashup Selector
Name:PTC.Nav.DynamicForm.MashupSelector
Description: Name of a mashup. Used to create links to a specific mashup.
Structure:
{
"mashupName": "name of mashup",
}
Example of a mashup selector from thelinkToMashup key in Tasks:
{
"mashupName":"PTC.CRDetailedReviewAppMashup"
}
Radio Button
Name:PTC.Nav.DynamicForm.RadioButton
Description: The value is one of the values specified in the component definition.
Structure:
{
"selectedKey" : "option1",
}
Example of a radio button from the selectionType key in Attachments:
{
"selectedKey":"multi"
}
In the above example, the options for selectedKey are none, single, and multi.
Entity Selector (BETA)
Name:PTC.Nav.DynamicForm.EntitySelector
Description: Name of a ThingWorx Navigate entity, such as a Thing Shape, Thing Template, Thing, Mashup, User, or Group.
Structure:
{
"entityName": "name of entity"
}
Example of an entity selector from the modelThingName key in Action Bar:
{
"entityName":"PTC.ActionBarModel.Thing"
}
Field Filter
Name:PTC.Nav.DynamicForm.FieldFilter
Description: The filters object of a TWX Query Parameter where the fieldName key has an empty string value.
Structure:
{
"filters" : 'filters' object of a TWX Query
}
Example of a field filter from the defaultSelectedFilterValues key in Tasks:
{
"filters":{
"filters":[
{
"fieldName":"",
"type":"EQ",
"value":"POTENTIAL"
},
{
"fieldName":"",
"type":"EQ",
"value":"ACCEPTED"
}
],
"type":"Or"
}
}
Definition Group
Name: PTC.Nav.DynamicForm.DefinitionGroup
Description: Placeholder that can be used to inject additional configuration properties into the component configuration.
Structure:
{
"value": {JSON representation of additional data},
}
Example of a definition group from the implementationConfiguration key in Tasks:
{
"value":{
"taskTypeFilter":{
"value":"[{\"activityName\": \"Conduct Online CRB Review\",\"workItemProcessTemplate\": \"Change Request Workflow\"}]"
}
}
}
Attributes Selector
Name:PTC.Nav.DynamicForm.AttributesSelector
Description: Used to select one or more attributes from the backend system. See the section Structure for Selecting Attributes below for more information.
Structure:
{
"selectedValues": {
"data": [{
"adapter": {
"thingName": "WindchillAdapterThing",
"instanceName": "JapanWindchill"
},
"itemListsData": [{
"objectType": "WT.PART.WTPart",
"items": [{
"id": "name of property",
"additionalData": {
"ContainerKey1":{additional properties},
"ContainerKey"2:{additional properties},
},
"ordinal": 2
},
{
"id": "name of property",
"additionalData": {
"ContainerKey1":{additional properties},
"ContainerKey2":{additional properties},
},
"ordinal": 1
}]
}
},
{
"adapter": {
"thingName": "WindchillAdapterThing",
"instanceName": "UKWindchill"
},
"itemListsData": [{
"objectType": "WT.PART.WTPart",
"items": [{
"id": "name of property",
"additionalData": {
"ContainerKey1":{additional properties},
"ContainerKey2":{additional properties},
},
"ordinal": 0
},
{
"id": "name of property",
"additionalData": {
"ContainerKey1":{additional properties},
"ContainerKey2":{additional properties},
},
"ordinal": 3
}]
}]
}]
},
}
Example of an attributes selector from the attributes key in Tasks:
{
"selectedValues":{
"data":[
{
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
},
"itemListsData":[
{
"items":[
{
"additionalData":{
"implementationAttributesDefinition":{
"linkToMashup":{
"mashupName":"PTC.CRDetailedReviewAppMashup"
}
},
"itemListAttributesDefinition":{
"fieldTitleOverride":{
"value":""
}
}
},
"id":"Activity|Name",
"ordinal":0
},
{
"additionalData":{
"itemListAttributesDefinition":{
"fieldTitleOverride":{
"value":""
}
}
},
"id":"Subject|SubjectName",
"ordinal":1
},
{
"additionalData":{
"itemListAttributesDefinition":{
"fieldTitleOverride":{
"value":""
}
}
},
"id":"Activity|Deadline",
"ordinal":2
},
{
"additionalData":{
"itemListAttributesDefinition":{
"fieldTitleOverride":{
"value":""
}
}
},
"id":"Status#Display",
"ordinal":3
},
{
"additionalData":{
"itemListAttributesDefinition":{
"fieldTitleOverride":{
"value":""
}
}
},
"id":"Activity|Context|Name",
"ordinal":4
}
],
"objectType":"PTC.Workflow.WorkItem"
},
{
"items":[
{
"additionalData":{
"itemListAttributesDefinition":{
"fieldTitleOverride":{
"value":"PTC.Nav.TaskList.TaskProgress"
}
}
},
"id":"TaskProgress",
"ordinal":5
}
],
"objectType":"PTC.Workflow.WorkItem.Custom.Implementation"
}
]
}
]
}
}
Attributes Sets Selector
Name:PTC.Nav.DynamicForm.AttributesSetsSelector
Description: Used to select attributes from the backend system and separate them into different groups. The value for name is a string that is the name of the set of attributes. The data key contains the same structure as the Attributes Selector property type. See the section Structure for Selecting Attributes below for more information.
Structure:
{
"sets": [
{
"name": "Set Name 1",
"data": {Structure for Selecting Attributes}
},
{
"name": "Set Name 2",
"data": {Structure for Selecting Attributes}
}
],
}
Example of an attributes sets selector from the attributes key in Attributes:
{
"sets":[
{
"data":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":""
}
],
"objectType":""
}
],
"adapter":{
"instanceName":"PTC.WCAdapter",
"thingName":"windchill"
}
}
]
}
},
"name":""
}
]
}
Pattern Selector
Name:PTC.Nav.DynamicForm.PatternSelector
Description: Used to create a string or pattern that includes one or more attributes from the backend system. The structure for this property type is very similar to the Structure for Selecting Attributes, with the addition of the numericIdentifier key for each attribute and the pattern key at the end. In the pattern key, the % symbol together with a number represents the attribute that has the same number as its numericIdentifier value. In the user interface, the attribute name is shown in the pattern string.
Structure:
{
"selectedValues": {
"data": [{
"adapter": {
"thingName": "WindchillAdapterThing",
"instanceName": "JapanWindchill"
},
"itemListsData": [{
"objectType": "WT.PART.WTPart",
"items": [{
"id": "sold",
"numericIdentifier": 0
},
{
"id": "totalStock",
"numericIdentifier": 2
}]
}
},
{
"adapter": {
"thingName": "WindchillAdapterThing",
"instanceName": "UKWindchill"
},
"itemListsData": [{
"objectType": "WT.PART.WTPart",
"items": [{
"id": "totalStock",
"numericIdentifier": 1
}]
}]
}]
},
"pattern": "%0 and %2 out of %1"
Example of a pattern selector from the primaryTitle key in Task identity:
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"numericIdentifier":1,
"id":"Subject|SubjectName"
}
],
"objectType":"PTC.Workflow.WorkItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
},
"pattern":"%1"
}
Structure for Selecting Attributes
There are three property types that you can use for specifying the subset of attributes from the backend system that you want to display in the component: Attributes Selector, Attributes Sets Selector, and Pattern Selector. They each use a similar JSON structure that includes required properties and optional properties
Required properties:
thingName– the name of the adapter Thing for the backend system
instanceName– the instance name of the backend system adapter
objectType– the object type of the attribute
id– the ID of the attribute
Optional Properties:
additionalData– any relevant sub-properties are included under this property.
ordinal– this property determines the order in which the attributes appear in the user interface, where the attribute with an ordinal value of 0 appears first, the attribute with an ordinal value of 1 appears second, and so on.
The following code shows the general structure for selecting attributes.
* 
ThingWorx Navigate currently only supports using one adapter and one instance in any particular configuration of a component.
{
"selectedValues":{
"data":[
{
"adapter":{
"thingName":"WindchillAdapterThing",
"instanceName":"JapanWindchill"
},
"itemListsData":[
{
"objectType":"WT.PART.WTPart",
"items":[
{
"id":"name of property",
"additionalData":{
"ContainerKey1":{
"additional properties"
},
"ContainerKey2":{
"additional properties"
}
},
"ordinal":2
},
{
"id":"name of property",
"additionalData":{
"ContainerKey1":{
"additional properties"
},
"ContainerKey2":{
"additional properties"
}
},
"ordinal":1
}
]
},
{
"objectType":"PTC.Workflow.WorkItem",
"items":[
{
"id":"name of property",
"additionalData":{
"ContainerKey1":{
"additional properties"
},
"ContainerKey2":{
"additional properties"
}
},
"ordinal":0
},
{
"id":"name of property",
"additionalData":{
"ContainerKey1":{
"additional properties"
},
"ContainerKey2":{
"additional properties"
}
},
"ordinal":3
}
]
}
]
}
]
}
}