on 07/24/2023 02:03 PM
This can be achieved using the exclusion query in the functions table as follows:
select entitlement_values.ENTITLEMENT_VALUEKEY from entitlement_values where entitlement_values.ENTITLEMENT_VALUEKEY in (select entitlement_values.ENTITLEMENT_VALUEKEY from roles, role_entitlements where roles.ROLEKEY= role_entitlements.ROLEKEY and role_entitlements.ENTITLEMENT_VALUEKEY= entitlement_values.ENTITLEMENT_VALUEKEY and roles.ROLETYPE=3)
In the above query, ROLETYPE=3 refers to the Firefighter Roles as the customer wanted to exclude the firefighter ones from getting evaluated.
Please note that exclusion query needs to be populated for all the functions in a particular ruleset and that can be achieved by writing a custom query as follows:
UPDATE `functions` SET `EXCLUSIONQRY` = 'select entitlement_values.ENTITLEMENT_VALUEKEY from entitlement_values where entitlement_values.ENTITLEMENT_VALUEKEY in (select entitlement_values.ENTITLEMENT_VALUEKEY from roles, role_entitlements where roles.ROLEKEY= role_entitlements.ROLEKEY and role_entitlements.ENTITLEMENT_VALUEKEY= entitlement_values.ENTITLEMENT_VALUEKEY and roles.ROLETYPE=3' WHERE (`FUNCTIONKEY` = '331');
You can define the functionkeys from a particular ruleset in the custom query above.
Please refer to the screenshots below: