Alpha Video Training
Results 1 to 2 of 2

Thread: *when()

  1. #1
    Member
    Real Name
    Jack DeBoer
    Join Date
    Oct 2006
    Location
    Houston, TX
    Posts
    457

    Default *when()

    Has anyone tried this in a browse and it work?

    I have a form that has 2 major calculated fields in a browse along with a number of different color equations on each column. The form is slugish when you get a lot of records in the browse. In going thru the new features of V10.5 I found this function of *when() that will only recal when there is a change in the watch expression only. I figures this would speed the form up. Only problem is I can not get it to give the correct calculation now. It seams so simple to do. All I am doing is like the help states. I have cftotal = 1longexpression This works fine, but when I do cftotal = *when(recno(),1longexpression) I get wrong calculation.

    It would be a big pain to get a working (or not working example) so just seeing if anyone has any ideas before I go and make a working example.

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

    Default Re: *when()

    Hi Jack,
    I just used it on a multiple color expression and it seems to work....but without a lot of records it is hard to know for certain if the watch does....

    If this doesn't work I have coded this into an embedded browse a while back in v8 for the exact same reason you want to use this for....I just tested if the object was a certain field and only performed that calculation instead of recalculating every field each time to significantly increase the speed of the browse response (instant instead of 4-5 seconds to go from one row to the next).
    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
    __________________________________________




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
  •