Filtering Records

Filtering Records

In the records tab under any view, records can be filtered to find the ones you need. This can be as simple as typing the name of a buyer or product title. You can also store filters under the filter menu or add scripting to specify specific fields or criteria to filter by.

filtered records
When records are filtered, all actions such as printing or exporting are only performed on the filtered records.

Filter Controls

In the filter box on the toolbar type the word or phrase that you want to filter by. The list will refresh when you stop typing.

You can filter for single words or phrases, or use wildcards and or filters. The filter negative button inverts the current filter, showing the records that are not filtered. The checkbox button filters only records that are checked.

Special Codes

&

AND filter, which can be used to match more than one word or phrase e.g. Jones&Big Widget will filter all records containing Jones AND Big Widget. 

|

 OR filter, which is used to match records that contain different words or phrases. e.g. Jones|Big Widget will filter all records that contain Jones OR Big Widget

#Name

Calls the script filter function, where name is used to identify the filter. 

\

Escape character is used to search for & or | e.g. \& will search for &

!LBL

Records with a shipping label

!TKN 

Records that have a tracking number 

!XPT

Records that have a carrier export defined

Filter menu

The filter menu stores commonly used filters. To create or edit the items on the menu go to Tools>Options>Records>Edit Filters.

Each line contains the name that appears on the menu and the filter to be used, the filter text is exactly the same that can be typed into the filter textbox as described above.

Special codes and fields

The same special characters from the filter textbox, can be used with the addition of the following that apply only to the filter menu.

-= Adds a separator bar to the filter menu.

{tday} inserts today's date into the filter when it is selected.

{yday} inserts yesterday's date into the filter when it is selected.

Script filtering

Using Packing Partner's scripting, allows you to apply any filtering criteria that you need.

The filter script is called using #name , where name is passed to the script to identify what filter needs to be used.

To access the scripting go to Tools>Scripting (this is a feature that needs to be enabled).

To insert a skeleton for the function: Under the Code button on the toolbar, select Records>Records_Filter

The script example below is called using filter text of #large or #small, which can be typed directly into the filter textbox or stored in the filter menu as described above.

Note
The name passed to the script will be in lower case, regardless of what is entered in the filter textbox

Members of the RecordStruct that is passed to the function, can be found by using the auto-complete functionality of the script editor. e.g. Typing Record followed by a . will show all members of Record.

Function Records_Filter(Record As RecordStruct, Name As String ) As Boolean
  On Error Resume Next
  Select Case Name
  Case "large"
   For Each Item As ItemStruct In Record.Invoice.Items
    If Item.Title.Contains( "Large Widget" ) Then Return True
   Next
  Case "small"
   For Each Item As ItemStruct In Record.Invoice.Items
    If Item.Title.Contains( "Small Widget" ) Then Return True
   Next
  End Select
  Return False
End Function