Filter Purchase Orders

Top  Previous Topic  Next Topic

 

The filter feature directs the program to display only a certain set of purchase orders.  For instance, you can set the filter so that as you page through the purchase orders on the Main Purchase Order Screen, only vendors from the state of California are displayed, or only vendors from New York are displayed.

To reach the filter feature, select ORDER TOOLS from the Menu Bar and choose FILTER PURCHASE ORDERS.  The following dialog box appears:

POFilter

 

Selecting Common Filtering Options.   In the long blank on the Filter Purchase Order dialog box, enter a filter formula.  To aid you in constructing a filter, a number of common filtering options are listed at the bottom of the dialog box.  By clicking on the plus sign (+) next to the desired option, the filter formula will automatically be inserted for you.

On the list of common filters, whenever you see the word "Current" used (i.e. " Current Vendor," "Current PO Code" etc) it means that the vendor's name or code or other information will be taken from the purchase order currently showing on the Purchase Order Screen.

For instance, if you need to set up a filter so that only Baker and Taylor purchase orders are displayed, page up or down to a Baker and Taylor purchase order.  That becomes your current purchase order.  Bring up the Filter dialog box, then click on the "+" beside "Current Vendor."  The filter formula for Baker and Taylor will automatically be inserted.  When you click on OK, only Baker and Taylor purchase orders will be shown.

You can also combine filters from the list.  For example, you could: 1) Click on "Current Vendor";  2) click on "AND"; and 3) click on "Current 'Ordered By' Individual"  The resulting filter would display all purchase orders created by the person named in the "Ordered By" field for the current vendor showing on the Purchase Order Screen.

You can also limit filters to a certain time range.  For example, you can limit the display of the current vendor for this year.  (Note the change in terminology.  AnyPO isn't using the term "Current Year" here.  Instead it's using "This Year."  In this case AnyPO doesn't use the year of the PO Date but rather the year in which you are living.  So, if it's 2015, then AnyPO will use 2015 and not the year appearing on the current Purchase Order.)  To use this feature, you would: 1) Click on "Current Vendor"  And then 2) click on "Limit to this Year."  When you click OK, only PO's issued to the current vendor in 2015 will be listed on the Main Purchase Order Screen.

When you have the desired filter entered, press OK.  Once you return to the Purchase Order Screen, you activate the filter by pressing Page Up or Page Down on your keyboard.  Then as you page through more purchase orders, only those that match the filter will show.

A filter stays in effect until you specifically remove it by selecting ORDER TOOLS >> TURN FILTER OFF.

If you have used a filter and then you return to the Filter Dialog Box and create a new filter.  The old filter is overwritten with the new filter.

Quotes (") in the Filter.  Double quotes in the filter demand special attention.  If you are filtering for 2" Nails in the item, the filter will look something like:   ITEM->ISBN="2" Nails"  If you try to set the filter, AnyPO will trigger an error.  The problem is that AnyPO is confused by the double quote after the "2."  It's best not to use double quotes for item descriptions, rather use two single quotes - but we understand that you may not remember that.  Nonetheless, you can make this filter work.  Change the outside double quotes to single quotes:  ITEM->ISBN='2" Nails'  AnyPO will accept this filter since there's no double quote confusion.  You can also use square brackets:  ITEM->ISBN=[2" Nails].

Filters on Networks.  Filters can slow network speeds, and on occasion, when using a filer you may received the message: "PO is Being Edited by Another User."  If possible, avoid the use of filters when others are actively creating and editing PO's in the program.

Clear and Previous. If you'd like to clear the formula line, click on "Clear."  If you like to re-call the most recent filter, click on "Previous."

Saving Filters.  You may wish to save your own commonly used filters.  To do so, first create the filter and run through the purchase orders to make sure that filter does what you want.  Return to the Filter dialog box and click on the "Save" button.  A dialog box will appear which allows you to save up to four filters.  Click on a paste button beside an unused filter formula blank.  This will insert the current (or most recently used) filter formula in the blank.  Then beside the filter formula, type in a descriptive name that will help you remember the filter.  The name can be up to 16 characters long.  Click "Save" to save the formula and your descriptive name.  You can recall a saved filter by clicking on the down arrow beside "Recall Saved Filter" and selecting the appropriate descriptive name.  To remove a saved filter, delete it.  To replace a saved filter with a new one, type-in the new information over the top of the existing one.

Recall Saved Filter.  As described above you can save your own commonly used filters under a descriptive name.  To recall a saved filter click on the down arrow beside "Recall Saved Filter" and select the appropriate name.  If you click the down arrow and decide not to recall a saved filter, click on the blank at the top of the list.  When you click on the blank, no filter formula will be entered.

Creating Reports With Filters.  When you use the Filter Dialog Box, the display of PO's on the Main Purchase Order Screen is limited to those meeting the requirements of the filter.  In addition to the display, you may wish to print a list of the filtered PO's.  That's done by using the Report Generator (FILE >> EXPORT AND REPORT GENERATOR.)

The following series of steps will lead you through the process of creating a report based on a filter.  As you can see, initially, there are quite a few steps.  But once you do this, the program remembers it all.  To create the report in the future, it's just a matter of selecting which report you want and clicking a button to start the process.  It's that easy.  Moreover, this method has distinct advantages.  Instead of being forced to use canned reports, this technique allows you to specifically tailor reports to your business needs.

Here are the steps:

1. Before going into the Report Generator, create a filter that you wish to use.

2. Once you have tested the filter and you satisfied with the result, turn off the filter (ORDER TOOLS >> TURN FILTER OFF)

3. Next select FILE >> EXPORT AND REPORT GENERATOR.

4. Click on the "Create New Profile" button.

5. Give the Profile a name.

6. Select "Text - Tab Delimited"

7. Select what fields you'd like to have in your report by choosing a field from the first window and then clicking on the big plus (+).  The field will be moved to the second window.  Each field showing in the second window will be a column in the resulting spreadsheet.  (More details on creating a profile is found here.)

8. When you have selected all of the fields that you want, save your work by clicking "Save Profile."

9. Click on the "Other Options" button.

10. The "Other Options" screen will appear.  Look near the bottom and you'll see "Paste Filter"  Click on it.  This will paste the most recent filter (the same one that you created and tested in steps 1 and 2 above) into the Filter blank.

11. Click on the "Save" button.

12. You'll be returned to the profile page.  We're all done here.  Click "Close"

13. Now you'll be back at the first Export & Report Generator dialog box.  Once back to this dialog box, in panel # 3, type in a file name.  Let's call it "Report1.txt" but you can give it any name but be sure to include the .txt extension.

14. In panel #4, select "Use a filter to determine which PO's are exported"

15. In panel #5, select "If exporting to a dbase or tab delimited file: immediately start-up spreadsheet program for editing  and/or printing"

16. In panel #6, put a checkmark beside:  "First Record: List Field Names"

17. Then click on "Start Export Process"

18. If you haven't yet done this, you'll be asked to enter the path to Excel.  Look for "C:\Program Files" on your computer and find Microsoft Office and then look for "Excel.exe."  (You don't necessarily need to use Excel.  You can use another spreadsheet program if desired.)

19. Click on "Start Export Process" once again.

20. Excel will open with a spreadsheet displaying of all PO's meeting your filter requirements.

Note: if you'd like to run the report again, be sure to close out of Excel.  Since Excel is displaying the file (Report1.txt), AnyPO won't allow you to create a new version of it.  So just close out Excel and you'll be able to run it again.

AnyPO will remember all of the above settings.  After you set things up.  All you need to do is select the appropriate report from the list of profiles, and click "Start Export Process."  That's it and you have the report you need.

Counting Formulas. You can also use the same formulas to count purchase orders.  The Count Purchase Order dialog box is reached by selecting ORDER TOOLS and COUNT PURCHASE ORDERS.  Any of the formulas described below will also work for counting purposes.

Constructing Your Own Filter.  You aren't limited to the list of common filters at the bottom of the dialog box.  Many others are possible by constructing your own filter formulas and entering them in the blank.  Below, you'll find a list of sample filter statements that you can use or alter to construct other filters.

To utilize the sample filters listed below, use the Copy and Paste function. Highlight the filter formula (shown in blue below) that you want and copy it to the clipboard.  (To copy, use Ctrl+C.  Or if you right click your mouse, you can also choose Copy from the Speed Menu). Click in the long blank on the Filter dialog box and paste it. (To paste, use Ctrl+V.   Another way to paste it, is to right click your mouse and choose paste from the Speed Menu).  Once the filter statement is in place, alter it with your own vendor names, states, cities, amounts, etc.

State = "MN"  Only purchase orders with MN in the vendor state blank will be shown on the screen.  You can substitute other states in the place of MN (like IA, CA, etc.).  Note you must include the double quotes around the abbreviation.

Bill_Name = "Name of Vendor"  Only the purchase orders which match the name of the vendor in the "Vendor" blank will be shown on the screen.  You can substitute any vendor's name for Name of Vendor.  The filter will be in effect only for the way the name is spelled and capitalized.  You must include the double quotes around the name.   There's a trick you can use to avoid the capitalization restriction by changing everything to upper case: UPPER(Bill_Name) = UPPER("Name of Vendor")  As long as the spelling is the same, this will find every matching name, no matter how it might be capitalized.

City = "New York"  Only purchase orders in which the vendor city is New York will be shown on the screen. You can substitute other states in the place of New York (like Boise, Chicago, etc.) You must include the double quotes around the city.

Total_Due > 100  Only purchase orders in which the total is greater than $100 will be listed.  You can put whatever number you desire in place of the 100.  Note that the purchase order filter will not include 100.  If you wanted all purchase orders in which the total due was 100 AND greater, use: Total_Due>=100

Inv_Date < {01/01/05}  Only purchase orders issued before 01/01/05 will be listed. You can insert your choice of a date in the curly brackets.  Note that it doesn't include 01/01/05.  To include it, use this: Inv_Date<={01/01/05}

Inv_Date > {06/01/05} .AND. Inv_Date < {12/31/05}  Only purchase orders issued between 06/01/05 and 12/31/05 will be listed. You can insert your choice of dates in the curly brackets. Note that the "AND" must have periods before and after it.  Also note that it doesn't include 06/01/05 and 12/31/05.  To include them, use this: Inv_Date>={06/01/05} .AND. Inv_Date<={12/31/05}

Taxable = .T.  This will list all purchase orders which are taxable.  You can also enter: Taxable=.F. which means all non-taxed purchase orders.  Note that "T" or "F" must have periods before and after.

Inv_Date > {12/31/05} .AND. Taxable = .T.  This will list all purchase orders issued after 12/31/05 (starting with 01/01/06) and are taxable.

Shipping > 0  This will list all purchase orders in which shipping was charged.

EMPTY(EmailAdd) = .F. This will list all purchase orders which do not have an email address.  The function EMPTY( ) means: is this item empty?

Discount = 40  This will display all purchase orders with a discount of 40%.  Indicate it as a whole number: 40 (for 40%)  or 25 (for 25%). You can substitute whatever number you desire.  You can also get a range: Discount=>25 .AND. Discount=<50  (This would list all purchase orders with discounts between and including 25% and 50%.).

Paid = .F. Lists all purchase orders which have not been marked paid.

InvCode="RET" Lists all purchase order which have a purchase order code of RET.

"Gift Wrapped" $ Notes Lists all purchase orders in which the two words "Gift Wrapped" appear someplace in the NOTES at the bottom of the Purchase Order Screen.  The "$" means to find any notes in which these words are found.

"University" $ Bill_Name  List all purchase orders in which the word "University" occurs in a vendor name.  The $ means to find any Bill Names with this word in it some place.

YEAR(Inv_Date)=2005 List all purchase orders which were created in 2005.

MONTH(Inv_Date)=6 .AND. YEAR(Inv_Date)=2005  List all purchase orders which were created in June of 2005.

Item->Catalog_No="SF/AWA" List all purchase orders which have products with your catalog number of SF/AWA

"A" $ InvCode List all purchase orders with an upper case "A" in the Purchase Order Code

List of Identifying Names for Constructing Filters.

Identifying names (the names used in filter formulas) are listed below and are shown in blue.  Each identifying name is proceeded by item's title (in purple) as it appears on the Purchase Order Screen.  Information on how to treat the identifying name (number, word, date, or true/false) is enclosed in parentheses.  (Note that a number of the identifying names appear unrelated to the data they represent.  That was done to retain compatibility when AnyPO is used in conjunction with the companion products AnyBook and AnyOrder.):

Vendor #: Cust_no  (Use a number: 105)

 

Vendor Name: Cust_no (Use words in quotes: "Mainstreet Books")

 

Vendor Address1: Address1(Use words & numbers in quotes: "101 S. 2nd")

 

Vendor Address2: (Address2        Use words in quotes: "PO Box 204")

 

Vendor City: City (Use words in quotes: "Boise")

 

Vendor State or Province: State (Use state abbreviation in quotes: "CA")

 

Vendor Zip Code: Zip_Code (Use numbers or letters in quotes: "83401")

 

Vendor Zip Extension: Zip_Ext (Use numbers in quotes:  "4596")

 

Vendor Country: Country (Use words in quotes" "CANADA")

 

Shipping Name: Ship_Name(Use words in quotes: "Mainstreet Books")

 

Shipping Address1: Add1 (Use words & numbers in quotes: "101 S. 2nd")

 

Shipping Address2: Add2 (Use words in quotes: "PO Box 204")

 

Shipping City: Cit (Use words in quotes: "Boise")

 

Shipping State or Province: St (Use state abbreviation in quotes: "CA")

 

Shipping Zip Code: Zip (Use numbers or letters in quotes: "83401")

 

Shipping Zip Extension: Szip_Ext (Use numbers in quotes:  "4596")

 

Shipping Country: Scountry (Use words in quotes" "CANADA")

 

Alternative PO Number: PO_Number (Use numbers or words in quotes: "BA54569")

 

Job (or Accnt) #: Card_auth (Use numbers or characters in quotes: "U655"

 

Arrival Date: PO_Date (Use a date in curly braces: {01/01/15})

 

Purchase Order Date: Inv_Date (Use date in curly braces: {12/01/15}

 

Internal PO Number: Invoice_No (Use a number: 1001

 

Taxable? Taxable (Use a .T. to indicate True or .F. for False)

 

Tax Rate: Tax_Rate Tax rate on that purchase order (Use a decimal number: .05 [5% tax])

 

Percentage Discount: Discount (Use a whole number: 40 [40%])

 

Less Discount: Less_Disc (Use a number: 25  [means $25])

 

Amount of Sales Tax: Tax (Use a number: 5.14 [means $5.14])

 

Shipping Amount: Shipping (Use a number: 30 [means $30])

 

Total: Total_Due (Use a number: 200 [means $200])

 

Paid? Paid Has this purchase order been marked paid? (Use .T. for True, .F. for False)

 

Paid Date Date1  (Use date in curly braces:  {06/07/15})

 

Terms (or UDF Code): Visa (Use words in quotes: "Net 30 Days")

 

Preferred Shipping Method: ShipVia (Use words in quotes:  "UPS")

 

FOB: Card_Name Freight on Board (Use words in quotes: "Anchorage"

 

Ordered By: TrackingNo (Use words in quotes: "Bill Mason"

 

Notes: Notes (Use words in quotes:  "Sent a free gift")

 

Phone Number: Phone (The number should be in quotes: "208-232-3912")

 

Fax Number: Card_Ref (The number should be in quotes: "415-233-4512")

 

Email Address: EmailAdd (The address should be in quotes: "bsmith@msn.com")

 

Requisition: NoRoyalty If NoRoyalty is True, then "Requisition" appears on top of the printed document .  (Use a .T. to indicate True, this is a requisition--or .F. to indicate that this is a PO.)

 

Requisition Date: Date2 (Use date in curly braces:  {06/07/15})  Note: This is currently only used for a departmental set-up available in AnyPO Level III.  For all other applications, this field is not used.

 

Requisition Number: Balance (Use words in quotes: "Req 12345")  Note: This is currently only used for a departmental set-up available in AnyPO Level III.  For all other applications, this field is not used.

 

Department Name: PaidVia (Use words in quotes: "Chemistry")  Note: This is currently only used for a departmental set-up available in AnyPO Level III.  For all other applications, this field is not used.

 

Approved: Fee  Use a .T. to indicate True, this is PO has been approved or .F. to indicate that PO has not been approved.

 

Initials of Approver(s): Exp  (Use letters or numbers in quotes: "RDW")

 

Revised: Consigned  Use a .T. to indicate True, this is PO has been revised or .F. to indicate that PO has not been revised.

 

Purchase Order Code: InvCode (Use letters or numbers in quotes: "RET")

 

ISO 3-letter currency abbreviation: ISOName (Use letters in quotes: "USD")

 

Close or Open: InvClosed If InvClosed is True, then the purchase order is closed.  If InvClosed is False, then the purchase order is open.  (Use a .T. to indicate True, the purchase order is closed--or .F. to indicate the purchase order is open.)

 

Cancel Date: SDate (Use date in curly braces:  {06/07/15})

 

User Defined Field 1: Udf1 (Use letters in quotes: "Extra Sizes Available" )

 

User Defined Field 2: Udf2 (Use letters in quotes: "Extra Sizes Available" )

 

User Defined Field 3: Udf3 (Use letters in quotes: "Extra Sizes Available" )

 

Your Catalog No: Item->Catalog_No (User letters or numbers in quotes: "NTBP1")

 

Vendor's Catalog No: Item->ISBN (User letters or numbers in quotes: "NTBP1")

 

Name of Item: Item->Item (product) (Use words in quotes:  "Never Turn Back")

 

Back Ordered Code: Item->User_Code (Use the code in quotes: "B" or "X")

 

Quantity Received: Item->Quan_Got (Use a number: 12)

 

Date Received: Item->Date_Got (product) (Use date in curly braces: {12/01/06}

 

Unit: Item->Unit (Use words in quotes:  "LOT")

 

 

Operators for Constructing Filters.

From the list of sample filter formulas, above, you can see that such operators as  ">" or "<" are useful in constructing filters.  Here's an itemized list and examples of how they are used:

<  Less Than. (Total_Due<100)

> Greater Than. (Total_Due>1000)

<= Less Than or Equal To. (Total_Due<=100)

>=  Greater Than or Equal To. (Total_Due>=1000)

<>  Not Equal To. (Total_Due<>100)

$  Substring Comparison. ("Barnes" $ Bill_Name)  This is the same as doing a partial word search in Advanced Search.  If the word "Barnes" is found somewhere in the vendor name, the purchase order will be displayed.

.AND.  Both statements must be true for the purchase order to display. (Bill_Name="BookShop" .AND. Discount=40 means that only BookShop purchase orders with a 40% discount will be displayed.)

.OR.  Either statement can be true for the purchase order to display. (Bill_Name="BookShop" .OR. Discount=40 means that all BookShop purchase orders will display along with all purchase orders with a discount of 40%.  Note that in this case purchase orders with a 40% discount will include more than just BookShop purchase orders. All purchase orders with a 40% discount will be included.)

.NOT. The statement must be not true for the purchase order to display.  (.NOT. Taxable means that all purchase orders which not taxable - in other words, the taxable box has not been checked - will be displayed.)

EMPTY(  )  If the identifying name within the parentheses is empty, the purchase order will be displayed. EMPTY(InvCode) means that all purchase orders which do not have a purchase order code will be displayed.