Advanced Customization > Adding Saved Filters to Your Mashup
  
Adding Saved Filters to Your Mashup
In Windchill, you can create and save filters for parts, documents, or EPM (CAD) documents. You can use these saved filters to display filtered structures in a ThingWorx mashup.
Creating and saving filters for parts, documents, or CAD documents can be done from the corresponding information page of the object. To use saved filters in a ThingWorx application, follow these best practices:
In a part structure mashup, a filter can only be specified by name. Ensure that all filters that you want to use in a ThingWorx application have unique names.
In most instances, saved filters are intended to be used with the specific object type for which they were created. Ensure the selected filters work with the object structure you want to display in the ThingWorx application.
ThingWorx Navigate
Saved Filter options are available on the task tailoring pages. For more information, see the “Common Tailoring for Tasks” section.
PTC Windchill Extension
You can code your ThingWorx Composer application to prompt the user for the saved filter. For example, the part structure sample mashup code provided by PTC includes a drop-down widget next to the PLM Part Number field that has one item (Latest):
You can modify the code for this drop-down widget to list any number of saved filters.
The output of the GetConfigurationChoices service is bound to the input of this drop-down widget. GetConfigurationChoices is a service of the ptc-windchill-demo-thing. You can edit the GetConfigurationChoices service script to modify the items that are shown in the drop-down widget to include one or more saved filter names. When selected, a saved filter is passed to Windchill.
The GetConfigurationChoices service returns an Infotable with two fields:
label is the value shown in the drop-down widget.
value is the name of the saved filter that is passed to Windchill.