List - Filter Property

String to be searched for to filter the list

Member of List (PRIM_LIST)

Data Type - Unicode String

Details

The filter property allows for a string to be searched for in List (PRIM_LIST).

The filter will search through the whole list for strings that contain the filter value.

A blank value will display the whole list.

Example

In this example the list is populated using with a call to server module #xDemoWebDataServices using server routine GetEmployees. This returns employees to fill the list.

The edit box at the top of the page uses the changed event to set the filter for the list

Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) Layoutmanager(#LayoutWebPage)

    Define_Com Class(#PRIM_TBLO) Name(#LayoutWebPage)
    Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutWebpageRow) Displayposition(1) Parent(#LayoutWebPage)
    Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutWebpageColumn) Displayposition(1) Parent(#LayoutWebPage)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem_List) Alignment(TopLeft) Column(#LayoutWebpageColumn) Manage(#EmployeeList) Parent(#LayoutWebPage) Row(#LayoutWebpageRow) Flow(Down) Sizing(ContentHeightFitToWidth) Margintop(8)

    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutWebPageItem1) Alignment(TopLeft) Column(#LayoutWebpageColumn) Manage(#Search) Parent(#LayoutWebPage) Row(#LayoutWebpageRow) Sizing(FitToWidth) Flow(Down)
    Define_Com Class(#PRIM_LIST) Name(#EmployeeList) Columnheaderheight(48) Columnlines(False) Displayposition(2) Height(431) Left(0) Parent(#COM_OWNER) Rowheight(48) Tabposition(1) Top(83) Width(1200) Showpages(True) Rowsperpage(15)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn1) Columnunits(Proportion) Columnwidth(1) Displayposition(1) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeIdentification)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn2) Columnunits(Proportion) Columnwidth(1) Displayposition(2) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeTitle)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn3) Columnunits(Proportion) Columnwidth(1) Displayposition(3) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeSurname)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn4) Columnunits(Proportion) Columnwidth(1) Displayposition(4) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeGivenNames)
    Define_Com Class(#PRIM_LIST.DateTime) Name(#ListColumn5) Columnunits(Proportion) Columnwidth(1) Displayposition(5) Parent(#EmployeeList) Showtime(False) Sortonclick(True) Source(#xEmployeeDateofBirth)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn6) Columnunits(Proportion) Columnwidth(1) Displayposition(6) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeGender)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn7) Columnunits(Proportion) Columnwidth(1) Displayposition(7) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeStreet)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn8) Columnunits(Proportion) Columnwidth(1) Displayposition(8) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeCity)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn9) Columnunits(Proportion) Columnwidth(1) Displayposition(9) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeState)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn10) Columnunits(Proportion) Columnwidth(1) Displayposition(10) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeePostalCode)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn11) Columnunits(Proportion) Columnwidth(1) Displayposition(11) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeCountry)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn12) Columnunits(Proportion) Columnwidth(1) Displayposition(12) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeHomeTelephone)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn13) Columnunits(Proportion) Columnwidth(1) Displayposition(13) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeBusinessTelephone)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn14) Columnunits(Proportion) Columnwidth(1) Displayposition(14) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeMobilePhone)
    Define_Com Class(#PRIM_LIST.Number) Name(#ListColumn15) Columnunits(Proportion) Columnwidth(1) Displayposition(15) Parent(#EmployeeList) Sortonclick(True) Source(#xEmployeeSalary)
    Define_Com Class(#PRIM_LIST.DateTime) Name(#ListColumn16) Columnunits(Proportion) Columnwidth(1) Displayposition(16) Parent(#EmployeeList) Showtime(False) Sortonclick(True) Source(#xEmployeeStartDate)
    Define_Com Class(#PRIM_LIST.DateTime) Name(#ListColumn17) Columnunits(Proportion) Columnwidth(1) Displayposition(17) Parent(#EmployeeList) Showtime(False) Sortonclick(True) Source(#xEmployeeTerminationDate)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn18) Columnunits(Proportion) Columnwidth(1) Displayposition(18) Parent(#EmployeeList) Sortonclick(True) Source(#xDepartmentCode)

    Define_Com Class(#PRIM_MD.Edit) Name(#Search) Caption('Search List') Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(2) Top(0) Captioncolor(Theme900) Helpercolor(Theme300) Helpertext('Search for text in list') Width(1200) Prompticon('search') Prompticonheight(32) Prompticoncolor(Theme900)

    Define_Com Class(#xDemoWebDataServices.GetEmployees) Name(#GetEmployees)

        Evtroutine Handling(#COM_OWNER.Initialize)

            #GetEmployees.Execute( #EmployeeList )

        Endroutine

        Evtroutine Handling(#Search.Changed)

            #EmployeeList.Filter := #Search

        Endroutine

End_Com

See also

All Component Classes

Technical Reference

EPC1420030 V14sp2 November 2018