Consumer filter
A Consumer filter makes filter criteria of a dependent Entity available. This extends the available filtering options of the current Entity.
Example
In Context Person, titled Contact in the Global Menu, users can filter
contact persons according to the topic of a connected Activity:

This was made possible by the following steps:
- In the RecordContainer, the ConsumerMapping for Consumer
Activitieswas initialized. - In the property sheet of this ConsumerMapping,
filtertypewas set toEXTENDED. - In the property sheet of this ConsumerMapping,
isFilterablewas set totrue. - The ConsumerMapping defines a
filterConditionProcess.

import { result, vars } from "@aditosoftware/jdito-types";
import { newSelect, newWhere, SqlBuilder } from "SqlBuilder_lib";
let subselect = newSelect("CONTACT.PERSON_ID")
.from("CONTACT")
.join("ACTIVITYLINK", "ACTIVITYLINK.OBJECT_ROWID = CONTACT.CONTACTID")
.and("ACTIVITYLINK.OBJECT_TYPE", "Person")
.join("ACTIVITY", "ACTIVITY.ACTIVITYID = ACTIVITYLINK.ACTIVITY_ID")
.where(vars.get("$local.condition"));
let sql = newWhere("PERSONID", subselect, SqlBuilder.IN());
result.string(sql.toString());