Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

FILTERGROUP Function (Record)

Changes the filter group that is being applied to the table. You can also use this function to return the number of the current filtergroup. You cannot return the number of the filtergroup and set a new filtergroup at the same time.


[CurrGroup] := Record.FILTERGROUP([NewGroup])

Parameters

Record

Type: Record

A record pointing to the table with which you want to work.

NewGroup

Type: Integer

The number of the filter group that you want to use.

Type: Integer

The number of the current filter group.

There are filtergroups with numbers from 0 to 255.

A filtergroup can contain a filter for a Record that has been set earlier with the SETFILTER Function (Record) or the SETRANGE Function (Record). The total filter applied is the combination of all the filters set in all the filtergroups.

When you select a FILTERGROUP, subsequent filter settings by the SETFILTER Function (Record) or the SETRANGE Function (Record) apply to that group.

All groups are active at all times. The only way to disable a group is to remove the filters set in that group.

Filters in different groups are all effective simultaneously. For example, if in one group, a filter is set on customer numbers 1000 to 2000, while in another group, a filter is set on customer numbers 1800 to 3000, the result will be that only numbers in the range 1800 to 2000 are visible.

C/SIDE uses the following FILTERGROUPS internally.

Number Name Description

0

Std

The default group where filters are placed when no other group has been selected explicitly. This group is used for filters that can be set from the filter dialogs by the end user.

1

Global

Used for filters that apply globally to the entire application.

2

Form

Used for the filtering actions that result from the following:

3

Exec

Used for the filtering actions that result from the following:

4

Link

Used for the filtering actions that result from the following:

5

Temp

Not currently used.

6

Security

Used for applying security filters for user permissions.

A filter set in a group different from FILTERGROUP 0 cannot be changed by a user that uses a filter dialog to set a filter. If, for example, a filter has been set on customer numbers 1000 to 2000 in group 4, the user can set a filter that delimits this selection further, but cannot widen it to include customer numbers outside the range 1000 to 2000.

It is possible to use one of the internally used groups from C/AL. If you do this, keep in mind that you will replace the filter that C/SIDE assumes is in this group. If, for example, you use FILTERGROUP 4 in a form, you will replace the filtering that is actually the result of applying the SubFormLink Property. This could seriously alter the way forms and subforms interact.

Community Additions

ADD
Show:
© 2015 Microsoft