Function Categories
String Functions
| Function | Arguments | Return Type | Description |
|---|---|---|---|
toupper | string | String | Converts a string property value to uppercase |
tolower | string | String | Converts a string property value to lowercase |
trim | string | String | Removes leading and trailing whitespace |
concat | string, string | String | Concatenates two string values |
substring | string, Int32 (start), Int32 (length) | String | Extracts a portion of a string starting at a position for a specified length |
replace | string (search), string (replacement) | String | Replaces occurrences of a substring with another |
length | string | Int32 | Returns the character count of a string property |
indexof | string (source), string (search) | Int32 | Returns the position of a substring within a string |
toupper
Converts the property value to uppercase for case-insensitive comparisons:
tolower
Converts the property value to lowercase:
trim
Removes whitespace from both ends of the property value:
concat
Concatenates two string values:
substring
Extracts a substring starting at the given position:
| Argument | Type | Description |
|---|---|---|
| Source | string | Property to extract from |
| Start | Int32 | Zero-based start position |
| Length | Int32 | Number of characters to extract |
replace
Replaces occurrences of a search pattern:
length
Returns the string length as an integer:
indexof
Returns the position of a substring (zero-based):
-1 if the search string is not found.
Date Functions
| Function | Arguments | Return Type | Description |
|---|---|---|---|
year | DateTime | Int32 | Extracts the year component from a DateTime property |
month | DateTime | Int32 | Extracts the month component (1-12) from a DateTime property |
year
Extract and filter by year:
month
Extract and filter by month (1-12):
Additional date functions such as
day, hour, minute, and second may be available. Verify supported functions in your Powersheet version.Dynamic Value Expressions
In addition to query function expressions, Powersheet supports runtime dynamic value resolution in constraint and where clause configurations:| Expression Type | Syntax | Description |
|---|---|---|
| Dynamic value | () => expression | Arrow function syntax evaluated at runtime |
| Context expression | $context.property.path | Dot-notation access to runtime context values |
Context Expression Examples
| Context Path | Description |
|---|---|
$context.source.project.id | Current project ID |
$context.document.id | Current document path (folder/name) |
Function Expression in Predicate Context
Function expressions are used within thewhere clause of an EntityQuery or within constraint definitions. They transform property values before the comparison operator is applied.
The general pattern is:
Complete YAML Example
Related Pages
- Predicates — filter condition structure that uses function expressions
- Operators — comparison operators applied after function transformation
- EntityQuery — top-level query containing the where clause
- Query Context — runtime context for dynamic value resolution
Sources: Code: FnExpression.java, helpers.ts (dynamic values), parseConstraints.test.ts, Operator.java
Sources
Sources
Source Code
FnExpression.javaprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/modules/configuration/helpers.tsQuery.javaprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/cypress/e2e/Sheet/reference.spec.tsQueryToLuceneTest.java