Predicate Basics
Predicates are conditions placed in thewhere clause of a source query. The query engine evaluates predicates to determine which entities from Siemens Polarion ALM are included in the sheet. Simple predicates compare a property value to a target; composite predicates combine multiple conditions with AND/OR logic.
Step 1: Use Equality Predicates
The simplest predicate matches a property to an exact value:UserNeed entities where severity equals critical.
For explicit equality syntax:
Step 2: Use Comparison Operators
The following comparison operators are available for filtering:| Operator | Meaning | Example |
|---|---|---|
eq | Equals | severity: { eq: critical } |
ne | Not equals | status: { ne: deleted } |
gt | Greater than | priority: { gt: 3 } |
ge | Greater than or equal | priority: { ge: 2 } |
contains | Substring match | title: { contains: safety } |
The
gt and ge operators work with numeric properties (integer, float). They are not applicable to string or boolean properties.Step 3: Check for Null Values
To filter entities based on whether a property has a value:Step 4: Combine Predicates with AND
Use theand operator to require all conditions to match:
critical severity AND approved status. AND arrays support any number of sub-predicates:
Step 5: Combine Predicates with OR
Use theor operator when any condition should match:
critical OR major.
Step 6: Nest Composite Predicates
AND and OR predicates can be nested for complex filtering logic:Step 7: Use NOT Predicates
Negate any predicate with thenot wrapper:
Verification
After updating thewhere clause in your sheet configuration and reloading the document:
- You should now see only entities that match your predicate conditions
- The row count in the sheet should reflect the filtered result set
- Verify that excluded entities are not displayed in the sheet
See Also
- Write an Entity Query — complete source query setup
- Filter by Document — scope predicates to a specific document
- Filter by Project — scope predicates to a project
- Optimize Queries — performance tips for predicate-heavy queries
- Configure Sources — full source configuration reference
Sources
Sources
Source Code
Query.javaQueryExecutorTest.javaprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/__tests__/odata-where-merger.test.tsQueryToLuceneTest.javaPolarionQueryProcessor.java