Customizing Information Content and Access > Adding Properties and Fields on Assets, Lines, and Sites
Adding Properties and Fields on Assets, Lines, and Sites
Additional properties and fields, such as Customer and Group, can be added on assets, lines, and sites in the ThingWorx Apps user interface by customizing the appropriate mashups.
Adding Properties and Fields to the Asset Advisor
To display additional properties and fields, such as Customer and Group, on the asset detail page in Asset Advisor, complete the following steps:
1. Modify the Thing Template used for your assets, so that the assets have the necessary properties, such as customerName and group. For example:
a. In ThingWorx Composer, navigate to the PTC.ISA95.PhysicalAssetThingTemplate Thing Template.
b. Under Properties and Alerts, add two properties to the My Properties table, named customerName and group. Both properties must have a Base Type value of STRING. Ensure that the Persistent checkbox is selected for both properties.
c. Click Save to save the Thing Template.
2. Edit the PTC.SCA.SCO.AssetMonitor.C_AssetDetailContainerMashup_[ReleaseVersion] mashup.
* 
When viewing or editing mashups that are provided with ThingWorx Apps, click Skip if presented with a message asking if you want to migrate to use new widgets.
a. Under Explorer, select mashupcontainer-217.
b. Under Properties, find the Name property.
c. Click X to remove the existing value and replace it with PTC.SCA.SCO.AssetMonitor.C_AssetSummaryMashup_[ReleaseVersion].
d. Click Save to save the updated mashup.
3. Edit the PTC.SCA.SCO.AssetMonitor.C_AssetSummaryMashup_[ReleaseVersion] mashup.
a. Under Explorer, select AssetIdentityLayout.
b. Under Properties, find the HeaderHeight property.
c. Increase the value to allow more space for the property table to display additional properties.
d. Click Save to save the updated mashup.
4. Navigate to the launch point configuration Thing (PTC.Factory.C_LaunchPointConfigurationThing_[ReleaseVersion]).
5. Under Configuration:
Edit the AssetDetailContainerMashup entry to point to PTC.SCA.SCO.AssetMonitor.C_AssetDetailContainerMashup_[ReleaseVersion].
In the EquipmentUserInterfaceSettings configuration table, edit the AssetDetailContainerMashup entry for the Asset equipment type to point to PTC.SCA.SCO.AssetMonitor.C_AssetDetailContainerMashup_[ReleaseVersion].
6. On the PTC.SCA.SCO.AssetMonitor.AssetDetail.AssetDetailServiceController Thing, override the GetIdentityInfo service, using the following code as an example:
var asset = Things[assetId];
var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({dataShapeName:"PTC.SCA.SCO.AssetMonitor.AssetList.AssetIdentityDataShape"});
if (asset !== null) {
var newEntry = new Object();
newEntry.name = assetId;
newEntry.displayName = asset.displayName;
newEntry.image = asset.assetImage;
if(asset.assetImage !== null){
newEntry.customClass = "";
}
else{
newEntry.customClass = "defaultImage";
}
var assetAttributes = me.GetAssetAttributes({
assetId: assetId /* THINGNAME */
});
newEntry.attributes = assetAttributes;

var newAttributeEntry = new Object();
newAttributeEntry.name = "Customer:";
newAttributeEntry.baseType = "STRING";
newAttributeEntry.value = asset.customerName;
newEntry.attributes.AddRow(newAttributeEntry);

newAttributeEntry = new Object();
newAttributeEntry.name = "Group:";
newAttributeEntry.baseType = "STRING";
newAttributeEntry.value = asset.group;
newEntry.attributes.AddRow(newAttributeEntry);

result.AddRow(newEntry);
}
7. In ThingWorx Apps, click Asset Advisor.
8. From the asset list, open an asset created with the Thing Template edited in step 1. The new properties are now visible.
Adding Properties and Fields to the General Information Page for Equipment
To display additional properties and fields on the General Information page in Configuration and Setup > Equipment, complete the following steps:
1. Duplicate the mashup to override:
For an asset or KEPServerEX-based asset: PTC.Factory.ManufacturingElementGeneralInfo
For a line: PTC.SCA.SCO.LineGeneralInfo
For a site: PTC.Factory.SiteGeneralInfo
For more information, see Duplicating Extension Entities.
2. Update the duplicate mashup as necessary to include the new properties and fields. Ensure that the required bindings are in place. Save the duplicate mashup with a new name.
3. Duplicate the menu to override:
For an asset or KEPServerEX-based asset: PTC.SCA.SCO.PhysicalAssetMenu
For a line: PTC.SCA.SCO.ManageLineMenu
For a site: PTC.SCA.SCO.ManageSiteMenu
Save the duplicate menu with a new name.
4. Under Menu Definition, edit the table row with a Link value matching the name of the mashup that was duplicated in step 1. Replace the Link value with the name of the mashup created in step 2.
5. Click Save to save the menu.
6. Navigate to the launch point configuration Thing (PTC.Factory.C_LaunchPointConfigurationThing_[ReleaseVersion]).
7. Under Configuration, scroll to the EquipmentTypeSettings configuration table.
8. Click Edit icon to edit the row for the appropriate equipment type.
9. Replace the ConfigurationMenu value with the duplicate menu created in step 3, and click Set.
10. Click Save to save the updated launch point configuration Thing.
11. In ThingWorx Apps, click Configuration and Setup.
12. In the Equipment table, select a piece of equipment of the equipment type you have updated. The new properties and fields are now visible on the General Information screen.
Was this helpful?