Working with Filters

You can use filter methods in your template to work on a subset of data according to a filter scope. These methods are available for a lot of elements.

This page discusses:

See Also
Filtering a Projected or an Official View
Method Parameters Category Internal Name Return Description
Various instances and structure types
Consider All Variants Filtering filterAllVariants Various types such as PLM.Requirement Specification, PLM.RFLPLMFunctionalReference, etc. A sublist of the same type of data by activating the 150% mode. Insert this method in a Filter By Model Version loop to ensure that all variant effectivities are considered.For more information concerning the 150% mode, see Social and Collaborative | Multidiscipline Configured Product Development | Configured Engineering | Configured Engineering | Filtering Configured Structures | Filtering Configured Structures Using Configuration Criteria.
Filter By Model Version() Model Version: an object of model version type Filtering filterByModelVersion Various types such as PLM.Requirement Specification, PLM.RFLPLMFunctionalReference, etc. A sublist of the same type of data using a filter scope data that is a model version. For more information, see 'Filter by' Example.
Filter By Product Configuration() Product Configuration: an object of product configuration type Filtering filterByConfiguration PLM.Requirement Specification A sublist of the same type of data using a filter scope data that is a product configuration. For more information, see 'Filter by' Example.
Filter By Predefined Configuration() Predefined Configuration: an object of predefined configuration type Filtering filterByPredefinedConfiguration PLM.Requirement Specification A sublist of the same type of data using a filter scope data that is a predefined configuration. For more information, see 'Filter by' Example.
PLM.RFLPLMFunctionalReference, PLM.RFLVPMLogicalReference, PLM.VPMReference, PLM.`Requirement Group`, PLM.`Requirement Specification`, PLM.Chapter, PLM.Requirement
Apply an Advanced Filter () Advanced Filter: an object of advanced filter type Filtering filterByAdvancedFilter PLM.Requirement Specification Specifies a filtering context based on the advanced filter passed in parameter. For more information, see About Advanced Filtering and TagsAdvanced Filter Example and Limitations.

'Filter by' Example

The example below shows the behavior when you insert one of the Filter By xxx() methods:



Item Description

A loop defined on the Filter By xxx method with the following arguments:

  • Receiver: var.
  • Parameters: data. The type of this data corresponds to xxx expectation (xxx can be a model version, product configuration, or predefined configuration)

Returned variable: varWithFilter

A loop defined on any method with the filtering receiver: varWithFilter.

Returned variable: varM1

Any terminal method, which returns a terminal data.

This is important, if you use varM1 in the loop defined in .

A loop defined on any method with the receiver: var.

Returned variable: varM2

Any terminal method that returns a terminal data.

This is important, if you use varM2 in the loop defined in .

Note: You can use a filtered variable as a parameter in a subtemplate call.

Advanced Filter Example and Limitations

The image below shows the behavior when you insert the Apply an Advanced Filter () method in your template definition as the Advanced Parameter is mandatory:

You must define the Advanced Parameter as PLM.ENOStrRefinementSpecification.

Note: The use of an advanced filter is subject to a number of limitations:
  • It is only possible to obtain a filtered structure for indexed data.
  • Filtering a root structure other than the root structure configured in the advanced filter remains impossible.
  • Filtering occurs deep in the structure only for methods that extend into that depth. A deep structure remains unfiltered unless one of the specified requirement relationship methods applies:
    • To Requirement Group Content
    • To Sub Requirement Group
    • To Specification Structure
    • To Sub Requirement
    or Get All Sub-components, Get All Sub-Functions, or Get All Sub-Products.