Alpha Video Training
Results 1 to 5 of 5

Thread: "Filtering" Based on Code

  1. #1
    Member
    Real Name
    Michael Payton
    Join Date
    Dec 2007
    Posts
    294

    Default "Filtering" Based on Code

    Example:

    Table - Open Items
    Fields - Beg_Balance, Paid_to_Date

    If I don't have a "Field Rule calculated field" equal to Beg_Balance minus Paid_to_Date... what's the best way to design a Filter which will get me Open Items which have a remaining balance?

    Also, is there anyway to, in essense, CANCEL() an onfetch event. For example, is there any place to put code that will result in our code being an extension of the Filter in effect during the fetching of records? The reason I ask is that we need to, in essense, Filter based on data in a remote/foreign system.
    "all things should be as simple as possible... but no simpler"

    Mike

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: "Filtering" Based on Code

    If I don't have a "Field Rule calculated field" equal to Beg_Balance minus Paid_to_Date... what's the best way to design a Filter which will get me Open Items which have a remaining balance?
    (Beg_Balance - Paid_to_Date) >0

    Also, is there anyway to, in essense, CANCEL() an onfetch event.
    No. Events which begin with "can" can be cancelled, no others. Cansave, canedit, candepart, etc.

    The reason I ask is that we need to, in essense, Filter based on data in a remote/foreign system.
    You probably need to elaborate on this. No clue what you actually need to do.
    There can be only one.

  3. #3
    Member
    Real Name
    Michael Payton
    Join Date
    Dec 2007
    Posts
    294

    Default Re: "Filtering" Based on Code

    Thanks Stan...

    (Beg_Balance - Paid_to_Date) > 0 is what we figured, but performance is extremely slow when we have large numbers of records so we were hoping there was something we didn't know about.

    As to the other situation... we have code in an onfetch event that accesses a remote system. Right now, all we can do, based on what we find in the other system, is "flag" the record being fetched... but the end-user still sees/has to "wade through" all the records. So, we are looking for a way to filter out certain records... based on our onfetch code.
    "all things should be as simple as possible... but no simpler"

    Mike

  4. #4
    "Certified" Alphaholic
    Real Name
    JohnZaleski
    Join Date
    Oct 2000
    Posts
    1,736

    Default Re: "Filtering" Based on Code

    Michael,
    What about a calculated field
    balyn = if(balance - paid to date >0 ,"Y","N")
    then filter on that field
    To even make it faster you could index on this field to invoke LQO
    John

  5. #5
    Member
    Real Name
    Michael Payton
    Join Date
    Dec 2007
    Posts
    294

    Default Re: "Filtering" Based on Code

    Thanks John...

    We will likely end up with a calculated "field rule," and an index on that field... but it will need to be more than Y/N in that they typically want/need to restrict based on the value(s) rather than just a balance or not.
    "all things should be as simple as possible... but no simpler"

    Mike

Similar Threads

  1. form.view("fName","","","center","center")
    By reynolditpi in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 07-15-2008, 12:37 AM
  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, 08:50 AM
  3. Filtering a "Search"
    By daddyz in forum Alpha Five Version 8
    Replies: 15
    Last Post: 11-26-2007, 08:21 PM
  4. Code editor. How to move out of "comment out"
    By BDennis in forum Alpha Five Version 6
    Replies: 4
    Last Post: 10-30-2005, 03:52 PM
  5. "Kill" button in code editor
    By CALocklin in forum Archived Wishlist
    Replies: 2
    Last Post: 12-13-2004, 08:20 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
  •