Table of Contents

USFMOD - User Filter support module

Module USFMOD USFMOD - User Filter support module

Description

Module to handle filters which could be defined by the users and to
interactively select a filter.
The intention of these filters is to have a central point to define
proxies.
A predefined extension of the USFMOD functions might be activated
when adding the field USGSET to the USG table to activate the filter
function for main groups (groups of user groups).

The User Filter Handling Module handles filters which could be defined by users and can interactively select a filter. The intention of using these filters is to have a central point to define proxies. A predefined extension of the USFMOD functions might be activated when adding the field USGSET to the USG table to activate the filter function for main groups (groups of user groups).

The idea behind USGSET is, that the user groups can be linked to other parent groups. This can be controlled depending on the availability of the field USGSET in the table USG. This table holds all defined user groups of the application. User groups are used for routing purposes and group together users, who are working in a common area of business.

If this field is set up in an installation (and link it to the codetable USGSET), the user groups can be linked different main groups predefined in USGSET. The filter can also be applied to these main groups, i.e. it is not only possible to look at a user group as a unit, but to look at several connected user groups (e.g. a department) altogether.


Properties

Property YES/NO
Single page frame No
Show toolbar No
Show menu No
Show statusbar No
Show hint No
Fit panel size No

Datafields

Name Description Data Type Len Dec. View lines View type Inst. Visible Codetable
FLT Filter Text 6 1 Edit Yes Public Embedded
SHWFLT Show Filter Control 10 1 Button Yes Public
BUTCLS Close Control 10 1 Button Yes Public
WRNTXT Warning Text 80 1 Edit Yes Read only
LABTXT Text of Label Text 20 1 Edit Yes Read only
USFTXT Text of Selection Text Text 20 1 Edit Yes Public
SELUSR Selected User Text 8 1 20 Edit Yes Public <fixed-length>
SELUSG Selected User Group Text 6 1 20 Edit Yes Public <fixed-length>
SELUSGSET Selected User Group Set Text 6 1 20 Edit Yes Public USGSET
USFUSRSTM Stream - Set of Users for Filter Stream 1 0 Source Yes Public
USFUSGSTM Stream - Set of User Groups for Filter Stream 1 0 Source Yes Public

Datafield Description and Properties

Datafield FLT Filter

Description

This field holds the name of the currently selected filter. This might be one of the predefined filters (starting with a '<'-character) or the default filter (which is identified by a blank value).

Codetable
Code Text
<ALL> All Users
<OWNG> Own User Group
<OWNU> Own Entries
Default Set
<SELG> Selected User Group
<SELU> Selected User
<SEGS> Selected Main Group

Datafield SHWFLT Show Filter

Description

This button might be used to give the user access to the currently defined set. It is shown in a read-only popup panel. Normally instead of the button the subpanel FLTP is used to handle sets.


Datafield WRNTXT Warning

Description

Warning text used to warn the user, when a potential illogical default set is defined, which does not include the current user.


Datafield LABTXT Text of Label

Description

Label text used to describe the possible selection of a user, a user group or a user group set.


Datafield USFTXT Text of Selection Text

Description

This field holds the text shown on the subpanel beside the filter selection. This text might be modified by an external rule, if a different text is required.


Datafield SELUSR Selected User

Description

This field holds the selected user. This field is only valid, when FLT holds the value “<SELU>”.


Datafield SELUSG Selected User Group

Description

This field holds the user group selected. This field is only valid, when FLT holds the value “<SELG>”.


Datafield SELUSGSET Selected User Group Set

Description

This field holds the user group set selected. This field is only valid, when FLT holds the value “<SELS>”.


Panels

Panel Type Description
FLTP FramePanel Select Filter Subpanel
SHWP FramePanel Show Filter

FramePanel FLTP

Properties
Property Value
Width 358
Height 46
Popup position-X 0
Popup position-Y 0
Visible Yes
Read only No
Show toolbar No
Instanciated No
Popup panel No
Global No

FramePanel SHWP

Properties
Property Value
Width 408
Height 320
Popup position-X 148
Popup position-Y 92
Visible No
Read only Yes
Show toolbar No
Instanciated Yes
Popup panel Yes
Global No

Rules

Rule Name Additional
function GetFltFldSql text method
function GetFltSelVal text method
function GetFltSvsFlds text method
function GetFltText text method
sub GetUsfRec method
sub GetUsfSet method
sub HandleSvsLodAddFldUsfMod method
sub RegisterSvsSavAddFldUsfMod method
sub SetFlt method
sub USFSetRecSelUser method

Rules Description and Comments

function GetFltFldSql( in ArgUsrFld text, in ArgUsgFld text, in ArgFlt text ) : text method

Function to create a sql where clause, for a specified USR and/or specified USG field.
Depending on the selected filter the two field will be restricted to the all values fitting to the specified filter.
If required the two field names might be prefixed by a instance id to identify the owning instance. (e.g. SPT.OWNUSR)
ArgUsrFld specifies the selected column holding the USR field or space if no USR-Field shall be used on this access.
ArgUsgFld specifies the selected column holding the USG field or space if no USG-Field shall be used on this access.
ArgFlt specifies the selected filter to be used.

Additional conditions for the two fields ArgUsrFld and ArgUsgFld:
1. At least one of the two has to be specified
2. both might be specified including a Instance-prefix


function GetFltSelVal( in ArgFlt text ) : text method

Function to return the selection value depending on the currently selected filter.


function GetFltSvsFlds : text method

Method to return a CR separated list of fieldnames to be saved
when storing the current selection of this moduleinstance.
Intended to be called in SaveSetting routines to append the
returned textblock to the Fieldliste to be saved by SvsSsnSave


function GetFltText( in ArgFlt text ) : text method

Function to create a text, which describes the selection returned by GetFltSql
ArgFlt specifies the selected filter to be used.


sub GetUsfRec( in ArgSet text ) method

Method of USFMOD to internal load the USF record
ArgSet should be the id of the Filter to be loaded. Typically the contents of the FLT field or
a blank value to access the default filter.


sub GetUsfSet( in ArgSet text ) method

Method of USFMOD to internal load the display grid
ArgSet should be the id of the Filter to be loaded. Typically the contents of the FLT field or
a blank value to access the default filter.


sub HandleSvsLodAddFldUsfMod( in ArgStm stream ) method

When loading SVS`s the USFMOD should reinitialize itself automatically and load the selected filter
ArgStm holds all loaded fields of the current SVS set


sub RegisterSvsSavAddFldUsfMod( inout ArgStm stream ) method

Check if filter used by USFMOD is stored in SVS to add the relevant data


sub SetFlt( in ArgFlt text, in ArgVal text ) method

routine to set the selected filter id and the selection value depending on the passed filter.
ArgFlt holds the filter ID to be selected
ArgVal holds the value optionally necessary depending on the passed filter ID
The value of ArgVal might previously be extracted via a call to the function GetUsfSelVal


sub USFSetRecSelUser method

Load the userid into the local field
Intended use as argument to GETADDSUB of USRGET


Modules

Module class Instance Comment
USF USF
USR USR
USG USG
USRGET USRGET