Grid - Advanced Filtering
Using Junctions
To filter the records either as an admin or as an end user can combine conditions with conjunctions like βORβ, βANDβ. Below is a complex filter query:
{
"or": [
{
"ParentId": {
"operator": "=",
"value": "$recordId"
}
},
{
"UltimateParent__c": {
"operator": "=",
"value": "$recordId"
}
}
]
}Using Inline SOQL
An inline SOQL query can be used to filter records within the current record. Inline SOQL can be used with βinβ operator only:
Using Parent Field
Any field from the current object can be used to filter the related records. Parent fields can be referenced in the filter property as a merge field $record.fieldApiName
Using $USER
Any field from the logged user can be used to filter the related records. User fields can be referenced in the filter property as a merge field $USER.fieldApiName
Using $CUSTOMSETTING
Any field from any custom settings can be used to filter the related records. Custom settings fields can be referenced in the filter property as a merge field $CUSTOMSETTING.objectApiName.fieldApiName
Using $APEX
For complex use cases, an apex class can be provided as a value provider for a filter property as a merge field $APEX.className({params})
The value provider class should implement a Callable interface and should be global. GridMate runs the value provider dynamically:
The example below showcase a specific value provider to filter ContentVersion based on the current record:
Querying All Rows
To query all rows set the flag gmpkg__allRows to true. The example below showcase a filter fecthing all the emails including the archived ones:
Last updated
Was this helpful?