Customizing Presentation > Customizing the Tag Picker Common Component
Customizing the Tag Picker Common Component
The tag picker common component can be customized in the following ways:
Disable Preservation of the Last Selection
By default, the last selection made by a user in the tag picker is preserved within a single session.
To disable this selection preservation:
1. In ThingWorx Composer, open PTC.Factory.Administration.TagConfigurationUtils.
2. In Properties, change the value of the isEquipmentSelectionPreserved property to false.
3. Click Save.
Browse Data from Custom Connectors
The tag picker common component can be customized to browse data from custom connectors.
1. To add the new connector equipment type to the Equipment Type drop-down list, create a new resource provider Thing Template with the following settings in ThingWorx Composer:
Name—The name for the Thing Template, for example My_Connector_ResourceProvider_Thing_Template.
Base Thing TemplateGenericThing
Implemented ShapesPTC.SCA.SCO.RemoteConnectionResourceProviderThingShape
Click Services, and override the services in the new Thing Template that pertain to the PTC.SCA.SCO.RemoteConnectionResourceProviderThingShape Thing Shape. For each service, click Override service icon to override and edit each service by adding appropriate scripts for your connector.
BindServerTags—This service is used to bind tags defined in a remote server to properties on the remote server Thing. A new property is created if a tag has never been bound. This service is not needed if no remote bindings are needed.
GetConnectedServers—(optional) This service is used to retrieve all the connected servers, resources, or equipment for a given Thing Template. You can optionally provide your own script for this, or use the service as implemented.
GetServerTags–This service browses tags for a given path and type filter.
GetServerTreeStructure—This service retrieves the next level of a tree structure for a given node of the connected server.
RemovePropertyBinding—(optional) This service removes the binding between the server tag and the target Thing. It also removes the property itself from the target Thing. You can optionally provide your own script for this service, or use the service as implemented.
For example scripts, refer to the services implemented on PTC.SCA.SCO.NITestStandResourceProviderThingTemplate and PTC.Factory.KepServerResourceProviderThingTemplate.
2. Create a resource provider Thing implementing the Thing Template created in step 1:
Name—For example, My_Connector_ResourceProviderThing.
Base Thing Template—Specify the new Thing Template created in step 1. In this example, My_Connector_ResourceProvider_Thing_Template.
3. Create a Thing Template representing the Remote Thing that you are attempting to expose:
Name—For example, My_RemoteThing_ThingTemplate.
Base Thing TemplateRemoteThing
4. Create a Remote Thing to represent the individual piece of equipment:
Name—For example, My_NewEquipment.
Base Thing Template—Specify the Thing Template created in step 3. In this example, My_RemoteThing_ThingTemplate.
5. Add your new equipment type to the launch point configuration Thing.
a. Open PTC.Factory.C_LaunchPointConfigurationThing_[ReleaseVersion].
b. Click Configuration.
c. Add a new row to the RemoteConnectionSettings table with the following settings:
ConnectionType—Enter the name that you want displayed for the connection type in the Equipment Type drop-down list on the tag picker. For example, New Equipment Type.
ResourceProviderName—Enter the resource provider Thing created in step 2. In this example, My_Connector_ResourceProviderThing.
RemoteConnectionThingTemplateName—Enter the name of the Thing Template representing the Remote Thing created in step 3. In this example, My_RemoteThing_ThingTemplate.
EnabledInTagPicker—Select this checkbox to make the connection type visible in the tag picker.
As a best practice, disable an equipment type by clearing the checkbox for the table row, rather than deleting the row.
* 
The newly created equipment type does not show in the Equipment Type drop-down list on the tag picker unless there is a connected Remote Thing representing that equipment type.
Was this helpful?