List Controller

From GeoMedia Smart Client
Jump to: navigation, search


Filters are used to limit the size of a result set; they are defined at FormField level as part of the visible="filter" attribute. The filter operator is entered for the filter="..." attribute.

The filter-value always corresponds to the WHERE-clause of the table-query. Of course, only persisted fields can be used as filter-fields (so if a non-persisted field should be used as a filter, this can only be done when including this (1:1) field into a DB-view and using this view as the base for the form).

The standard OGC-conform operators are:

  • filter="ISEQUALTO" → corresponds to "="
  • filter="ISNOTEQUALTO" → corresponds to "!="
  • filter="ISLESSTHAN" → corresponds to "<"
  • filter="ISGREATERTHAN" → corresponds to ">"
  • filter="ISLESSTHANOREQUALTO" → corresponds to "<="
  • filter="ISGREATERTHANOREQUALTO" → corresponds to ">="
  • filter="ISLIKESTART" → corresponds to "LIKE %FILTERVALUE"
  • filter="ISLIKEEND" → corresponds to "LIKE FILTERVALUE%"
  • filter="ISLIKE" → corresponds to "LIKE %FILTERVALUE%"
  • filter="ISBETWEEN → corresponds to "BETWEEN (FILTERVALUE1,FILTERVALUE2)", the GUI will show 2 Filter-Fields automatically

Definition of filters:

Simple example:

 <FormField  ... visible="list,filter" filter="ISGREATERTHAN" />

Advanced example:

 <FormField  ... visible="list,filter"  filter="SQL[TO_CHAR(DELIVERYDATE+MAXTIME/24-1/24,'')&lt;=TO_CHAR(SYSDATE,'')]" />

Temporary storage of filters:

Once set, a filter in a user-session is stored temporarily and can be recalled as long as the user does not Reset the Filter or start a new session. This means, if the user returns after several other steps to a List-Controller where he or she has set a filter once, this filter is still valid and deployed to the List-Entries as long as the user does not restore the standard List-View (resets the filter).

Persisting a filter in the datastore:

For logged-in users, filter-settings can be persisted in the WF_FILTERSETTINGS table, which can be recalled for later purposes after a re-login to the workflow in the upper-right combobox.. The deployment of predefined filters through the usage of the FormFilter element is described here .

Layout of the Filter-Fields in the Filter-area:

There is no positional argument for the alignment of the Filter-Fields. FormFilter - Filters are added to the combobox in the upper-right corner. The "normal" (visible="filter" ...) filters are positioned according to their appearance in the FormSettings.xml from left to right and from top to bottom. So if certain filters should appear in the same column (for example, all organizational aspects in column 1, and so on), then the definition can be kind of tricky. Just remember that the filter-FormFields have to use the "real" table-Field (in other words: persisted="false" does not work for filter-Fields, but could be used for FormFields used in List- and/or FormController).

To clarify the message, look at the image and the XML-definition below:

0501 filterdefinition2.png

    <Form name="SchoolForm" table="SCHOOL_P" idfield="ID1">
        <FormReport name="School" format="PDF" type="detail"/>
    	<FormFilter name="PublicSchools" label="Only public schools" filter="SQL[TYPE='PUBLIC']"/>
    	<FormFilter name="PrivateSchools" label="Only private schools" filter="SQL[TYPE='PRIVATE']"/>
    	<FormTab name="CHURCHES_Tab" label="General">
    		<FormGroup name="DetailGroup" label="Details">
    			<FormField name="ID1" type="textfield" datatype="guidstring" visible="hidden"></FormField>
    			<FormField name="NAME" label="Name" type="textfield" datatype="string" visible="list,filter" filter="ISLIKE"></FormField>
    			<FormField name="AREA" label="Area" type="textfield" datatype="string" visible="list,filter"></FormField>
    			<FormField name="TYPE" label="School Type" type="textfield" datatype="string" visible="list,filter"></FormField>
Language: English