DriveWorks Pro 16: TableSearch [send feedback...]

TableSearch

Searches all cells within the given table for a match to the specified search text and returns the entire rows as an array.

Syntax

TableSearch(Table or Table Name, Search Text, Ignore Case)

Where:

Table or Table Name is the Table to search.

Search Text is the criteria to search for

Ignore Case (optional) is False to perform a case sensitive search, True for insensitive.

Examples

RuleMeaning
TableSearch(DWLookupCustomers,"Concord",FALSE)Will search the table Customers to return an array containing only the rows that contain the search text "Concord".
TableSearch(DWLookupCustomers,"C*")Will search the table Customers to return an array containing only the rows that contain the search text "C*"(Returns everything that starts with a C).

Example Data

Customers Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance
Dynamo DynamicsIndianapolisUnited States
Eagle SizzlersColumbusUnited States
Everso LuckyBurlingtonUnited States
Forty SomethingsChicagoUnited States

Example 1 Outcome

CustomerNameCityCountry
Bolton BurnersConcordUnited States

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"CustomerName","City","Country";"Bolton Burners","Concord","United States"}

Example 2 Outcome

CustomerNameCityCountry
Bolton BurnersConcordUnited States
Cambridge CatsToulouseFrance
Eagle SizzlersColumbusUnited States
Forty SomethingsChicagoUnited States

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"CustomerName","City","Country"; "Bolton Burners","Concord","United States"; "Cambridge Cats","Toulouse","France"; "Eagle Sizzlers","Columbus","United States"; "Forty Somethings","Chicago","United States"}

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://hub.driveworks.co.uk/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.


Table of Contents