Example of how to configure Filter Field Override
As mentioned above, for columns that do not support sorting/filtering, it is possible to use an alternative sort field: in the example below, we work with an Applicationv2 Omnitable Generic/reusable component that can be added to pages to show a fully configurable/customizable list of records and actions. on a Job
A job (vacancy, position, role) is an opening for which a customer's client needs a placement. record and we configure Filter Field Override to be able to sort a custom column renderer that displays Off Limits icons. The goal is to be able to sort/filter based on which candidates
A person looking for a job. A candidate can also be referred to as a Job Seeker, Applicant, or Provider. in the Omnitable are Off Limits with either ‘Block’ or ‘Warn’ Off limits policy type.
Configuration Steps
-
First, create a Checkbox formula field on the ApplicationV2 object called 'Is Off limits for this project?' (Is_Off_Limits_for_this_Project__c) or similar, containing the following formula (this will determine which one of the candidates in the Omnitable is Off Limits):
IF (
OR ( TR1__Applicant A person looking for a job. A candidate can also be referred to as a Job Seeker, Applicant, or Provider.__r.TR1__Off_Limit_Info__r.TR1__Active__c = FALSE,
OR ( AND ( TR1__Applicant__r.TR1__Off_Limit_Info__r.TR1__Off_Limit_Policy__r.RecordType.Name = "ATS Stage Policy",
OR ( CASESAFEID( TR1__Applicant__r.TR1__Off_Limit_Info__r.TR1__Line_Item_Rank_1__r.TR1__Exempt_JobId__c ) = CASESAFEID( TR1__Job__c)),
OR ( AND ( TR1__Applicant__r.TR1__Off_Limit_Info__r.TR1__Off_Limit_Policy__r.RecordType.Name = "Account Policy",
CASESAFEID( TR1__Applicant__r.AccountId) = CASESAFEID( TR1__Job__r.TR1__Account__c )
)
)
)
)
, FALSE
, TRUE
)
-
Then create another formula field on the ApplicationV2 object, this time a text formula field called ' Off Limits Behavior' ( O_L_Behaviour__c) or similar, containing the formula:
This will determine which Candidates are Off Limits due to policies with ‘warn’ behavior and which are Off Limits due to policies with ‘block’ behavior
-
Once created, add the 'Off Limits Behaviour' formula field to the fieldset/s that are used for the Job ATS Omnitable.
-
Lastly, update the Job ATS JSON, in the column overrides section where you have the Off limit renderer configured and add the following:
"sortField" : "O_L_Behaviour__c",
"filterField" : "O_L_Behaviour__c"
So the code block looks like this:
{
"label": "Off Limit",
"fieldName": "TR1__Off_Limit__c",
"renderer": "tr1/offLimitRecordIcon",
"sortField" : "O_L_Behaviour__c",
"filterField" : "O_L_Behaviour__c"
}