Alpha Video Training
Results 1 to 5 of 5

Thread: WANT TO FILTER A LOOKUP TABLE

  1. #1
    JULIA ALLEN
    Guest

    Default WANT TO FILTER A LOOKUP TABLE

    HI, ALL. IN MY A4 DATABASE, I HAVE DIFFERENT SHIPPING OPTIONS FOR DIFFERENT ACCOUNTS THAT ARE DETERMINED BY A CODE STORED IN THE ACCOUNTS TABLE. RIGHT NOW, WHEN I ENTER AN ITEM IN THE BAGGAGE TABLE, THE SHIP_VIA FIELD DISPLAYS A DROP-LIST OF OPTIONS THAT ARE DETERMINED BY THE VALUE OF THE SHIPPING CODE IN THE ACCOUNT TABLE. A4 DOES THIS USING A LIST THAT CHECKS THE VALUE OF SHIP_CODE AND THEN LISTS THE OPTIONS THAT BELONG IN THAT LIST. I'M NOT MAKING MUCH SENSE - SO HERE'S WHAT THE CODE LOOKS LIKE NOW:

    ACCT-"SHIP_LIST="1"
    SHIP_VIA
    PICKUP
    DELIVERY
    FEDEX

    ACCT-"SHIP_LIST="2"
    SHIP_VIA
    PICKUP
    FEDEX
    AIRPORT

    ETC. NOW, I DON'T SEE A WAY TO DO THIS IN A5.
    TO ACCOMPLISH THE SAME THING, I'D HAVE TO DO A LIST WITH CONDITIONAL OPTIONS BASED ON THE VALUE OF SHIP_LIST IN THE ACCOUNT DATABASE, BUT I DON'T SEE HOW TO SPECIFY DIFFERENT LISTS BASED ON DIFFERENT VALUES. I TRIED CREATING A TABLE THAT CONTAINED A LIST OF SHIPPING OPTIONS AND THE SHIP CODES ASSOCIATED WITH THEM. THAT LOOKS LIKE THIS:

    SHIP_METHOD SHIP_CODES
    PICKUP 01,02,03,04,07
    DELIVERY 01,03,04
    FEDEX 01,02,04

    ETC. THEN, SINCE I COULD NO LONGER ACCESS THE VALUE OF SHIP_LIST FROM THE ACCOUNTS TABLE IN THAT LOOKUP BECAUSE I WAS LINKED TO THE SHIPPING METHODS TABLE INSTEAD, I CREATED A FIELD CALLED SHIP_CODE IN BAGGAGE AND LOOKED UP THE VALUE OF ACCOUNT-"SHIP_LIST TO FILL THAT FIELD. FINALLY, I TRIED A TABLE LOOKUP WITH A FILTER THAT CHECKED THE SHIPPING METHODS TABLE TO SEE IF THE VALUE OF SHIP_CODE WAS IN THE SHIP_CODES LIST, HOPING TO CREATE MY LIST BASED ON THAT FILTER, BUT NOW I CAN'T SEEM TO GET THE FILTER TO WORK. I CAN'T FIND A COMMAND TO SEE IF THE VALUE OF A FIELD IN ONE TABLE IS CONTAINED IN A FIELD IN ANOTHER TABLE.

    HOW WOULD YOU DO THIS? WHAT AM I DOING WRONG?

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: WANT TO FILTER A LOOKUP TABLE

    Julia,

    Unless you're visually impaired please stop typing in all caps. It's interpreted here as SHOUTING and is harder to read.

    Unzip the attached example to an empty folder. It shows you how to define a filtered table lookup field rule in order to pick a shipping method from a lookup table that's filtered to show only pertinent shipping methods, based on a Ship_Code field in the current table.

    Hope it helps.

    -- tom c

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: WANT TO FILTER A LOOKUP TABLE

    Julia,

    Unzip the attachment to an empty folder.

    It contains the original example, using a table lookup field rule.

    It also contains a new form illustrating how to use a dynamically populated list box to achieve the same result. There have been reports in the A5V5 forum that the list box approach works too slowly over a network. I don't have experience with it in that context so can't say for certain one way or the other.

    -- tom

  4. #4
    JULIA ALLEN
    Guest

    Default RE: WANT TO FILTER A LOOKUP TABLE

    Thank you, Tom. Sorry if I came across as shouting. I am visually impaired, and it is very hard for me to read the screen. I use all caps at work - thank God A5 still allows that conversion - and I often forget to turn it off when I'm working with others. I didn't mean to be rude.

    Your solution was perfect. And in fact, in reading further, I found a better way to assign the value of Ship_code when I enter the record. I was using a lookup for that field, and it wasn't working quite right. Then it occurred to me I should do the lookup when I assigned the Account_num field, which was the lookup. So I changed it, and now it works perfectly. Thanks again!

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: WANT TO FILTER A LOOKUP TABLE

    GREAT!

    -- tom

Similar Threads

  1. table lookup filter
    By pinzgauer in forum Alpha Five Version 5
    Replies: 0
    Last Post: 12-23-2003, 10:45 PM
  2. Filter expression not logical for lookup table
    By Robin Sculthorpe in forum Alpha Five Version 5
    Replies: 1
    Last Post: 04-11-2003, 09:11 AM
  3. Filter a lookup table?
    By Jeff Pearson in forum Alpha Five Version 4
    Replies: 0
    Last Post: 05-23-2002, 10:51 AM
  4. Limitations on Filter for Table Lookup
    By Elke in forum Alpha Five Version 4
    Replies: 12
    Last Post: 03-07-2002, 04:55 AM
  5. table lookup filter
    By martinwcole in forum Alpha Five Version 4
    Replies: 6
    Last Post: 11-21-2000, 08:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •