Search, query, and edge filtering - HxGN SDx - Update 64 - Administration & Configuration

Administration and Configuration of HxGN SDx

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

Search, query, and edge filtering are all controlled using the same property comparison mechanism which is configured as follows:

  • An argument on the Search and Query methods.

  • A property on the Edge Definition.

The following examples show the syntax criteria for various types of property comparison:

Properties on a document

You can add criteria to a document query to return only document revisions that match the specified revision states and exclude those undergoing change.

  • ISPFDocumentRevision~SPFRevState~=~e1WORKING|e1CURRENT|e1CANCELLED|e1RESERVED~ISPFDocumentRevision~SPFRevUnderChangeInSameConfig~=~False

    This comparison returns document revisions with various status that are not undergoing change.

Properties on an object

Properties on an object can be simply queried for in the form of InterfaceDefUID~PropertyDefUID~=~Enum value. For example:

  • ISPFDocumentRevision~SPFRevState~=~e1CURRENT

This provides support for !=.

  • ISPFDocumentRevision~SPFRevState~!=~e1SUPERSEDED

Properties on related objects

Properties on related objects are in the form of +/- RelDef to indicate the relationship direction. For example:

  • +SPFFileComposition~ISPFDocumentVersion~SPFIsDocVersionSuperseded~=~False

Environment variables and multiple criteria

Environment variables can be used. For example:

  • If the item owner is also the current username.

    +SPFItemOwner~IObject~Name~=~ENV.Username

  • The Transmittal is valid for the user and matches the related company.

    +SPFCToInternalOrg~IObject~Name~=~ENV.USERORGANIZATIONNAME

Multiple criteria can be specified that using AND ~ as a delimiter. For example:

  • ISPFDocumentRevision~SPFRevState~=~e1WORKING +SPFRevisionVersions~ISPFDocumentVersion~SPFIsDocVersionSuperseded~=~False

Alternate values can be tried for one property. For example:

  • ISPFDocumentRevision~SPFRevState~=~e1CURRENT|e1WORKING

Edge filtering

Edges are supported using the following format.

  • +EDG_edgename~interfacename~propertyname

Property criteria also supports 1:M (one to many) relationship testing.

  • +EDG_ItemContractUser~ISPFLoginUser~SPFLoginName~=~ENV.UserName

  • When criteria uses an = comparison operator, the string on the left has to equal the string on the right. However, when comparing relationships to objects, the = operator will do an ANY comparison. For example, an edge definition can expand from the contract to multiple users, any of which can match the current user.

  • The wild card * is supported for use in a general wild card string, and _ operator is supported in a string for single character matching. For example, IObject~Name~=~A_*|B_* works if you want to filter on values starting with an A or B, which are at least 2 characters long, and the _ ensures that the second character is present.

  • Wildcards are not supported with environment variables.

  • If you specify multiple values for a property comparison in an edge definition, you can use the NOT IN operator to filter out those results while matching the criteria. For example, +SPFFiletype~IObject~UID~NOT IN~FT_vecz|FT_binz filters out all the files related to the document except the WebGL files.