Alpha Video Training
Results 1 to 6 of 6

Thread: expression "contains"

  1. #1
    Member
    Real Name
    Kathleen Matthews
    Join Date
    Aug 2008
    Posts
    12

    Default expression "contains"

    Can someone help me with an expression please? I need to know how to write an expression that reads "CONTAINS" instead of "EQUALS" or "NOT EQUAL TO".
    Thank you for your help.

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,583

    Default Re: expression "contains"

    For a report filter you can use the $ operator.

    "b"$"abc" asks if "b" is contained in "abc"

    or

    <lookforthis> $ <inthischaracterfield>
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member
    Real Name
    Kathleen Matthews
    Join Date
    Aug 2008
    Posts
    12

    Default Re: expression "contains"

    Customerreffullname<Canteen> $ <Customerreffullname>
    as does <Canteen> $ <Customerreffullname>
    Shows as an invalid or incomplete expression.
    What am I doing wrong?
    Last edited by KathM; 08-08-2008 at 03:54 PM. Reason: add'l information

  4. #4
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: expression "contains"

    Hi Kathleen,

    You need to use double quotes for character values. In the interactive editor this works--

    Code:
    ?"Customerreffullname<Canteen>" $ "<Customerreffullname"
    = .F

    You should give an actual example. If you wanted to find out if the word "Canteen" existed in a string then used the syntax that Al provided.
    Code:
    "Canteen" $ "some_string"
    Or to find a word in a variable or actual field use

    Code:
    "Canteen" $ some_variable_or_field
    no quotes around variable or field name


    Here is a link to the online help file which might be useful
    http://support.alphasoftware.com/alphafivehelpv8/
    Last edited by MikeC; 08-08-2008 at 05:07 PM.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  5. #5
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,583

    Default Re: expression "contains"

    Quote Originally Posted by KathM View Post
    Customerreffullname<Canteen> $ <Customerreffullname>
    as does <Canteen> $ <Customerreffullname>
    Shows as an invalid or incomplete expression.
    What am I doing wrong?
    "Canteen" $ Customerreffullname
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  6. #6
    Member
    Real Name
    Kathleen Matthews
    Join Date
    Aug 2008
    Posts
    12

    Default Re: expression "contains"

    YEAH!! Success.............finally.
    Where would I be without Al & Mike (probably unemployed).

    Thank you Gentlemen

Similar Threads

  1. form.view("fName","","","center","center")
    By reynolditpi in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 07-14-2008, 11:37 PM
  2. "Add" and "Save" buttons don't stay on "Self" page
    By Scholin in forum Application Server Version 8
    Replies: 2
    Last Post: 02-05-2008, 07:50 AM
  3. Replies: 0
    Last Post: 09-16-2007, 11:07 AM
  4. Expression to set a numeric null field to zero "0.00"
    By kdankwah in forum Alpha Five Version 7
    Replies: 6
    Last Post: 09-13-2007, 11:17 AM
  5. "Filter expression not logical" on Table lookup.
    By Graham Wickens in forum Alpha Five Version 6
    Replies: 2
    Last Post: 12-24-2005, 03:29 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
  •