Home Search

DriveWorks Solo 22
TableFilter

Send Feedback

TableFilter

Eliminates non-matching values from the table that meet the given condition.

Syntax

TableFilter([ Table], [Column Index], [Condition], [Ignore Whitespace] )

Where:

Table is the table that is to be filtered.

Column Index is the column number the Condition is to be applied to.

Condition is the search condition that when matched will filter the table.

Ignore Whitespace (optional) is True to ignore leading/trailing whitespace characters in text strings in the condition, otherwise False.

Examples

Rule

Meaning
TableFilter(DwLookupItems,2,">900")

Filters the table to show only the values where column 2 (Width), of the Items table (below), is greater than 900. Will result in:

{"Item","Width","Position","Cost";"Double Cupboard with Drawer","1200","Left Wall","600";"Cupboard Left Drawer Right","1200","Left Wall","610";"Cupboard Right Drawer Left","1200","Left Wall","610";"Double Cupboard with Drawer","1200","Right Wall","600";"Cupboard Left Drawer Right","1200","Right Wall","610";"Cupboard Right Drawer Left","1200","Right Wall","610"}

Header rows will be included in the result

Array Result Displayed as a Table

ItemWidthPositionCost
Double Cupboard with Drawer1200Left Wall600
Cupboard Left Drawer Right1200Left Wall610
Cupboard Right Drawer Left1200Left Wall610
Double Cupboard with Drawer1200Right Wall600
Cupboard Left Drawer Right1200Right Wall610
Cupboard Right Drawer Left1200Right Wall610

Sample Data Table

Items Table

ItemWidthPositionCost
Single Drawer Unit600Rear Wall330
Double Drawer Unit900Rear Wall495
Single Cupboard Full600Rear Wall280
Double Cupboard Full900Rear Wall440
Single Cupboard with Drawer600Left Wall300
Double Cupboard with Drawer1200Left Wall600
Cupboard Left Drawer Right1200Left Wall610
Cupboard Right Drawer Left1200Left Wall610
Single Cupboard with Drawer600Right Wall300
Double Cupboard with Drawer1200Right Wall600
Cupboard Left Drawer Right1200Right Wall610
Cupboard Right Drawer Left1200Right Wall610

Available Operators

This is the list of operators that are available to create specific rules for the TableFilter Function.

Name of OperatorOperatorExample Rule
Less then<TableFilter(DwLookupItems,2,"<900")
Less then or Equal to<=TableFilter(DwLookupItems,2,"<=900")
Greater then>TableFilter(DwLookupItems,2,">900")
Greater then or Equal to>=TableFilter(DwLookupItems,2,">=900")
Not Equals<>TableFilter(DwLookupItems,2,"<>=900")
Equals= (No Symbol Required)TableFilter(DwLookupItems,2,"900")
Like"*"TableFilter(DwLookupItems,1,"*Single*")
Not Like"<>*"TableFilter(DwLookupItems,1,"<>*Single*")

DriveWorks Tech Tips Portal

Table Filtering

The TableFilter function allows a Data Table to be filtered using other form controls (such as a text box or combo box) so that only the relevant items are displayed.

View all Tech Tips

DriveWorks Tech Tips Portal is available to DriveWorks Pro customers with an active subscription and support contract.

Tech Tips provide cut down projects that highlight specific functionality for faster and more effective learning.

To access the portal:

  1. Go to https://my.driveworks.co.uk/learn/tech-tips/
  2. Login with your DriveWorks Pro account credentials, if asked
  3. Click the Visit Tech Tips Portal button for access

The portal provides a search facility, start typing the name of the Tech Tip (as indicated above) to display the Tip you require.


See also

How To: Work With Arrays