Alpha Video Training
Results 1 to 7 of 7

Thread: Table lookup [ condition ]

  1. #1
    Member
    Real Name
    shakapdeen
    Join Date
    Feb 2012
    Posts
    8

    Default Table lookup [ condition ]

    Dear all,

    I am got struck in creating condition in table lookup ( Field Rule ).

    I have two tables:-

    1) . item_mrp
    Fields:- sno, itemname, mrp

    Value :- 1 soap 100 10
    2 shampoo 50 10
    3 soap 50 20

    2) item details

    Fields :- sno, itemname, Mrp, c.p margin

    1 shampoo 10 7.5 2.5
    2 soap 10

    I need a lookup in Mrp field in itemdetails where condition itemname in item details = itemname in item_mrp

    What way i have write condition in table lookup ?

    Kindly give me solution

    Thanks

    saha

  2. #2
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Table lookup [ condition ]

    Hi Saha,

    You should have 3 tables. First table is where you enter a value that will be used in the condition of which table to lookup. Value = "A" lookup table item_mrp, Value ="B" lookup table item details. If this is not what you are trying to do then have a look at AlphaSports sample-> Invoice form
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  3. #3
    Member
    Real Name
    shakapdeen
    Join Date
    Feb 2012
    Posts
    8

    Default Re: Table lookup [ condition ]

    Dear Hubet,

    I went through the invoice form on alpha sport,

    It is normal lookup [ item name has one mrp ]

    In my case i have more than one mrp for a single item

    so i have to applying condition for fetching data from mater table

    Kindly guide me


    thanks

    saha

  4. #4
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Table lookup [ condition ]

    Hi Saha,

    Do you have 3 tables? I do not know what is mrp.

    First table is where you enter a value that will be used in the condition of which table to lookup. Value = "A" lookup table item_mrp, Value ="B" lookup table item details.
    Did you not understand what I have described?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  5. #5
    Member
    Real Name
    shakapdeen
    Join Date
    Feb 2012
    Posts
    8

    Default Re: Table lookup [ condition ]

    Dear Hubert,

    I have only two tables, Mrp means [ rate ]

    clearly saying

    example:

    In one table i have master details about the item

    in another table i am going to sale it

    kindly see the attachment

    Give me the feedback how to give lookup of selling_rate where itemname ( saletable) = itemname ( itemmaster)




    thanks

    saha
    Attached Files Attached Files

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

    Default Re: Table lookup [ condition ]

    Saha,

    I put the attached example together for you (before you posted your sample data). Unzip the attachment and extract its files to an empty directory.

    Instead of setting a "condition" in the table lookup field rule, I think you need a "filter".

    View Form1. You'll find two table lookups are in use. The first is not filtered, and is used to select the item. The second is filtered and is used to select the MRP.

    By the way, in your first post you reference a field that has a name which is illegal in Alpha Five. Do not use periods in fieldnames.

    -- tom

  7. #7
    Member
    Real Name
    shakapdeen
    Join Date
    Feb 2012
    Posts
    8

    Default Re: Table lookup [ condition ]

    Dear Tom,

    Thank you very much for your valuable information.

    Done. GURU

    Thanks

    SAHA

Similar Threads

  1. Lookup with dynamic filter in child table using field from parent table
    By Fisher in forum Application Server Version 11 - Web/Browser Applications
    Replies: 4
    Last Post: 11-11-2011, 09:06 AM
  2. lookup on two fields in lookup table
    By robert in forum Alpha Five Version 8
    Replies: 26
    Last Post: 03-13-2009, 09:44 PM
  3. filtering a table lookup based on a field in the current table.
    By flord in forum Alpha Five Version 9 - Desktop Applications
    Replies: 3
    Last Post: 07-25-2008, 05:22 PM
  4. Lookup field condition
    By Bill Parker in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 07-16-2008, 11:00 AM
  5. Condition Object's Condition
    By forskare in forum Alpha Five Version 5
    Replies: 2
    Last Post: 02-17-2004, 05:12 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
  •