Alpha Video Training
Results 1 to 4 of 4

Thread: query.filter -- Where?

  1. #1
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default query.filter -- Where?

    Hi all,

    This will seem very elementary for most of you but, a query.filter cannot be used in the expression of a calulated field, right? I've checked both manuals as well as searched the board and it's my understanding that a query.filter works on a button or in the form, letter or report's filter expression.

    Thanks for the clarification.

    kenn

  2. #2
    Jeff Moses
    Guest

    Default RE: query.filter -- Where?

    Ken, You can use calculated fields to some degree. Lets say you have three fileds in a table. field1, field2, and field3. They are all numeric. In field rules you make field three a calculated field with the expression:

    field1+field2

    If field1= 2 and field2=3, filed three would equal the sum of 5. The field3 could be used in a form expression like:

    feild3 = 6
    Only records where field1+field2 = 6 would filter through.
    Of course you could assing any value.

    Another way to do it would be to put the calculation itself right in the expression.

    Filter example:
    field1+field2=6

    This would accomplish the same thing without having the need for field3 at all. We use long calculations in filters and they work fine. I have never used calculated form fields in expressions and don't think you can, but I could always be mistaken!
    Jeff

  3. #3
    Jeff Moses
    Guest

    Default RE: query.filter -- Where?

    Nevermind! I should have read you question closer? Pay no attention, its getting late!
    Jeff

  4. #4
    Member
    Real Name
    Bill Warner
    Join Date
    Apr 2000
    Posts
    905

    Default RE: query.filter -- Where?

    The syntax:

    query.filter

    is used as one of the lines when you are scripting a query, i.e.:

    a_tbl = table.open("invoice")
    query.order = ""
    query.filter = "amt=10"
    query.options = "I"
    a_tbl.query_create()

Similar Threads

  1. Query Filter
    By Louis Nickerson in forum Web Application Server v6
    Replies: 4
    Last Post: 03-08-2005, 07:07 AM
  2. query filter
    By dik_coleman in forum Alpha Five Version 6
    Replies: 1
    Last Post: 10-05-2004, 07:29 AM
  3. Keep a Name while Filter or Query
    By forskare in forum Alpha Five Version 4
    Replies: 4
    Last Post: 05-12-2001, 05:31 AM
  4. Query filter
    By Jeff Moses in forum Alpha Five Version 4
    Replies: 8
    Last Post: 11-01-2000, 04:59 AM
  5. query filter using *ANY
    By Gary Smith in forum Alpha Five Version 4
    Replies: 2
    Last Post: 05-10-2000, 08:22 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
  •