Advanced Customization > Using Reusable Components > Available Reusable Components > Tile > Add a Custom Attribute to Tile
  
Add a Custom Attribute to Tile
The Tile reusable component displays attributes that have Windchill as their backend system. You can also add custom attributes to be displayed by Tile. These are either attributes that do not have Windchill as their backend system, or attributes that require custom logic to derive their values.
In order to add a custom attribute to the Tile component, follow the steps in the sections below.
Create a Custom Attribute for Tile
1. Create a new Thing Template in ThingWorx Composer. Set the Base Thing Template as PTC.TileAttributeModelThingTemplate.
2. Under the Services tab, click in the GetCustomAttributes row.
3. Add logic to create one or more custom attributes. The ObjectType must end with .Custom. The output format for this API is a Common Communication Object in the JSON format. The following is an example of what the output should look like:
{
"data": [
{
"itemListsData": [
{
"metadata": {
"AffectedObjects": {
"label": "Affected Objects",
"type": "STRING"
}
},
"items": [
{
"AffectedObjects": {
"value": ""
}
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest.Custom"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
],
"version": "1.0.0"
}
4. Save changes to the Thing Template.
5. Create a new Thing in ThingWorx Composer. Set the Base Thing Template to be the Thing Template you created earlier. Save the Thing.
Add Your Custom Attribute to the My Tasks Tailoring Page
If you want your custom attribute to appear in the tailoring page for My Tasks, follow these steps:
1. Search for the Thing named PTC.ViewMyTasks.TailoringPage.TilesAttributesThing in ThingWorx Composer. Select the Thing.
2. Under the Properties and Alerts tab, click in the modelThing row.
3. Input the name of the Thing you created above. Save PTC.ViewMyTasks.TailoringPage.TilesAttributesThing.
Now your custom attributes appear in the tailoring page for My Tasks.
Fetch Values for Your Custom Attribute
1. Open the Thing Template you created earlier.
2. Under the Services tab, click in the GetCustomAttributesValues row. It takes the following inputs:
input – input ID for which data needs to be fetched.
configuration – attributes selected from the tailoring page.
OOTBResponse – response for the OOTB tailored attributes.
3. Using the above parameters, if needed, add logic to fetch values for your custom attributes. Response should be in a format similar to the following sample:
{
"timeStamp": "2019-08-14 15:40:45.175",
"data": [
{
"itemListsData": [
{
"metadata": {
"AffectedObjects": {
"label": "Affected Objects",
"type": "STRING"
}
},
"items": [
{
"AffectedObjects": {
"value": "5"
}
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest.Custom"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
],
"statusMessage": "OK",
"status": "200"
}
4. Save the Thing Template.
Add Your Custom Attribute to a Mashup
1. Create a mashup or open an existing mashup.
2. Insert a Tile component into your mashup and click to configure the component.
3. Edit the value for the property modelThing so that its value is the same as the name of the Thing you created earlier.
4. Click Done and save your mashup.
* 
The Tile component supports hooking custom models to add custom attributes while tailoring My Tasks. If you select a custom attribute while tailoring and then change the model on tailoring Thing to add a new custom attribute, the custom attribute selected earlier will still appear in the Change Request details page of the Change Management Tasks Collection. To ensure the attribute selected earlier does not appear on the details page, save the tailoring page after updating the tailoring Thing.