SavedFilter and record parameters

I created a handler DataFilters and have a filter that needs some logic based on a hidden field in this record. Can I get to the data of the current record and pass it to the filter?

The rc/prc scope doesn’t have any useful values I can use.


on a hidden field in this record

Filters have no concept of what “this record” means. But, if you have a handler-based filter, then you do get the request context. And from that you can do what you need to get whatever data you need for your filter given the context you are running in.


function myFilterHandler() {
    if ( ( prc.objectName ?: "" ) == "my_object" && Len( Trim( prc.recordId ) ) ) {
        // or maybe need to run some more logic to get data you need if not already available
        return { filter={ someKey=prc.record.some_field } };

    return {};
1 Like