Configuring a Dynamic Filter
Learn to configure a dynamic filter.
To configure a dynamic filter:
- Create a field group for the source info area, i.e. the info area from which the filter values are retrieved.
- Create a List control and add the field(s) you want to use as filter values.
- Enter a parameter name as Function. (You can enter any text (without spaces), but best practice is using the field's XML name.)
- Define the filter.
- Add the above defined parameter as filter value (using the syntax
$par<name>
).Note: Date/time calculations with$par
expressions are currently not supported. - Add the field group and filter to the action configuration:
- the field group as
sourceCopyFieldGroupName
- the filter as
fixedFilterName
.
- the field group as
For more details, see the examples below:
Search
Searching for persons with the same Country as the parent company
via a button in the FI
Expand header:
Field group for sourceCopyFieldGroupName
: e.g.
FI.DynamicFilter
- List control:
Filter definition for fixedFilterName
, e.g.
KP.CountryFI
:
Search
action defined for a new button in the FI
Expand header:
In this case, the parent record is defined by link
. You can use the
sourceUid
parameter to pass another parent.
Clicking on the button opens a linked search that automatically displays only linked KP records with the same country as the parent FI record.
If the user enters additional search criteria, they are combined by logical AND.
Related Data
The above example can also be implemented for sub-lists:
FI
SearchSublist
and ExpandChildren
headers
Enter sourceCopyFieldGroupName,FI.DynamicFilter
as SubListParams.
The KP sub-lists for FI are filtered by the country of the parent company.
Examples in UPDATE_DEFAULT:
- The Text (04) sub-lists display all available translations of
a text record. Configured in the
SearchSublist
andExpandChildren
headers of header group04
with Filter04.BaseLanguageFilter
using field group04.AllTexts
. - The Station configuration (T0) sub-list contains only the
record defined for the selected station (AS). Configured in the
SearchSublist
andExpandChildren
headers of header groupAS
with FilterT0.ForStation
using field groupAS.ParametersForT0
.
Quick Add
Generic quick add page for offers - filtering the item list by the parent record's Product Group:
Field group for sourceCopyFieldGroupName
: e.g.
PR.DynamicFilter
- List control:
Filter definition for fixedFilterName
, e.g.
AR.ProdGrPR
:
SerialEntry
action e.g. defined for
A_SerialEntryAP
:
The item list displays only items (AR) with the same product group as the parent offer (PR).
Record Selector
Record selector for the Event Location field in the Marketing Activity (AK) info area - filtering for companies with the same Country as the marketing activity:
Field group for sourceCopyFieldGroupName
: e.g.
AK.DynamicFilter
- List control:
Filter definition for fixedFilterName
, e.g.
FI.CountryAK
:
Select-Function
defined for the Event Location
field in the AK
Details
control:selectRecord(
{
from:
{
infoAreaId: "FI",
useAutoSearch: true,
fixedFilterName: "FI.CountryAK",
sourceCopyFieldGroupName: "AK.DynamicFilter"
}
});
Clicking on the record selector icon opens a linked search that automatically displays only FI records with the same country as the current AK record.
If the user enters additional search criteria, they are combined by logical AND.