Alpha Video Training
Results 1 to 3 of 3

Thread: what is correct syntax when looking up a value from a table with multiple filters

  1. #1
    "Certified" Alphaholic richard2007's Avatar
    Real Name
    Richard Harris
    Join Date
    Sep 2007
    Location
    Ashford, Kent, UK
    Posts
    1,091

    Default what is correct syntax when looking up a value from a table with multiple filters

    i need to lookup value in a table with multiple filters but im struggling with the correct syntax, mainly because i am using 2 session variables and im not sure how to do it.

    Code:
    varEmpType1 = lookup("[PathAlias.ADB_Path]\tclienjobs.dbf","job_type = 'current' .and. client ="+quote(session.clientfirstname)" .and.caseref = "+quote(session.caseref),"employtype")
    thanks

  2. #2
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: what is correct syntax when looking up a value from a table with multiple filters

    Filter looks good, what happens when used? I tend to write mine like this, but s/b same results:

    varEmpType1 = lookup("[PathAlias.ADB_Path]\tclienjobs.dbf","job_type = 'current' .and. client ='"+session.clientfirstname+"' .and. caseref = '"+session.caseref+"'","employtype")
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  3. #3
    "Certified" Alphaholic richard2007's Avatar
    Real Name
    Richard Harris
    Join Date
    Sep 2007
    Location
    Ashford, Kent, UK
    Posts
    1,091

    Default Re: what is correct syntax when looking up a value from a table with multiple filters

    Quote Originally Posted by Steve Wood View Post
    Filter looks good, what happens when used? I tend to write mine like this, but s/b same results:

    varEmpType1 = lookup("[PathAlias.ADB_Path]\tclienjobs.dbf","job_type = 'current' .and. client ='"+session.clientfirstname+"' .and. caseref = '"+session.caseref+"'","employtype")
    steve, your filter worked for me.

    thanks for your help.

Similar Threads

  1. Correct Syntax help
    By doula in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 10-01-2011, 04:39 AM
  2. Correct query syntax
    By Ed Barley in forum Alpha Five Version 8
    Replies: 3
    Last Post: 01-30-2008, 09:17 PM
  3. Correct Filter Syntax
    By jwolfe11 in forum Alpha Five Version 8
    Replies: 1
    Last Post: 05-14-2007, 05:46 PM
  4. correct syntax for this query
    By crimmelcp in forum Alpha Five Version 5
    Replies: 1
    Last Post: 07-09-2004, 08:59 AM
  5. correct script syntax help
    By PhilD in forum Alpha Five Version 5
    Replies: 5
    Last Post: 08-21-2003, 07:51 AM

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
  •