Page tree
Skip to end of metadata
Go to start of metadata

Abstract / Use Case

In some cases it makes sense to show or hide smartcontainers underneath objects or to activate or deactivate functions for objects.
The requirements for such use cases are different in projects / from customer side.

For that reason there are configuration possibilities to build up such functionalities via configuration.

General definition of object filter

An object filter compares a property or status of an passed object with the given value und returns:

trueObject property fulfills the filter operation
falseObject propertiy does not fulfill the filter operation
nullObject does not support the defined property

A filter definition consists of following parts:

obr.filter.<FILTER_NAME> = <OTYPE>;[PRP | FLG];<PRP | FLG_NAME>;<DATA_TYPE>;<VALUE>;<OPERATION>;[INVERT]
<FILTER_NAME>

The integration of the filter in ECTR is based on the filter name.

name of the Filter

<OTYPE>Defines the object type of the filtered objects
  • * for every Object

  • DOC for documents
  • DOCPOS for documents in the assembly browser
  • MAT for materials
  • MAT_BOM_COMPONENT for Materials in the BOM container
  • FLOC for functional locations
  • CHANGE for Change Master
    ...
[PRP | FLG]Defines if the filter processes a status flags or a property
  • PRP for property
  • FLG for status flag
<PRP | FLG_NAME>The name of the property / status flag. If no specific object type is defined, it is also possible to tose the keyword $OBJECT_TYPE to filter specific object types
  • name of property or status flag
  • $OBJECT_TYPE
<DATA_TYPE>The data type of the property / status flag
  • STRING
  • DATE
  • INTEGER
  • FLOAT
  • BOOLEAN
<VALUE>The value to compare with the property / status flag. It is possible to use defined keywords.
  • value of property or status flag
  • TODAY compare with actual date. Can only be used with the data type DATE.
  • ASK Value input by the user. Currently only implemented for data type DATE, which displays a calendar dialog.
<OPERATION>Either a logical comparator or comparison by regular expression.
  • ">", "G" greater
  • ">=", "=>", "GE" greater or equal
  • "<", "L" lesser
  •  "<=", "=<", "LE" lesser or equal
  • "<>", "!=", "NE" not equal
  • "~", "RE" regular expression
[INVERT]Optional Parameter that inverts the result when set
  • INVERT
Example:


obr.filter.my_filter_1 = *;PRP;$OBJECT_TYPE;STRING;MAT;==

my_filter_1 will return true if the property object type of the object equals "MAT".

Object filter for smartcontainer and functions

Through configuration of an object filter it is possible

  • to hide or show a smartcontainer underneath of a referenced object, depending on properties of the referenced object
  • to deactivate or active a function for an object, depending on properties of the referenced object

Object filter for smartcontainers

There are two possibilities to use an object filter for smartcontainers.

Include filter
plm.smart.container.<CONTAINER_NAME>.includeFilter = <FILTER_NAME>

Using an include filter, the smartcontainer is only visible, when the filter evaluation returns true

Exclude filter
plm.smart.container.<CONTAINER_NAME>.excludeFilter = <FILTER_NAME>

Using an exclude filter, the smartcontainer is only visible, when the filter evaluation returns not true (false or null).

Example:
# Filter to hide SmartContainer at documents that have no ECN assigned
      plm.smart.container.ASGND_ECN.excludeFilter = ecn_asgnd_filter
      obr.filter.ecn_asgnd_filter = DOC;PRP;CHANGE_NUMBER;STRING;;EQ

The Smartcontainer for Assigned Change Numbers (ASGND_ECN) is hided, when there is no value for property CHANGE_NUMBER.

Object filter for functions

There are also possibilities to use an object filter for functions.


The object filter can used directly in combination with the function:

obr.filter.<FUNCTION_NAME> = <FILTER_VALUES>
Example
# Filter to deactivate the "Open Original for Edit" function when a document has status "Final Release" (FR)
      obr.filter.fnc.doc.open.fast.edit = *;PRP;STATUS;STRING;FR;==

The function "Open for Edit" is deactivated when the value for property STATUS is "FR".