Get a Jumpstart with our Sample Apps
Results 1 to 4 of 4

Thread: Summary Function Fileds A4 to A5

  1. #1
    Member
    Real Name
    Frank Wala
    Join Date
    Jun 2010
    Posts
    25

    Default Summary Function Fileds A4 to A5

    I'm trying to convert my A4 app to A5.

    A4 had several choices in the Types of Summary field selections. There was Total, Count, First, Last, Biggest and Smallest. I'm interested in replacing the "Biggest" function. This function will retain the highest number in the column of numbers it was tracking. I.e, if the column contained numbers 13, 49 and 66, the summary field would print 66.

    How would I replace this function in A5v10?

    Thanx,
    Frank

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Summary Function Fileds A4 to A5

    Check the help file topics for tableMax(). It could be used in a calculated field expression for your table, form, or report.

    Here's what the expression would look like to get the max field value for the "Extension" field in the "Invoice_items" table of AlphaSports

    Code:
    tablemax("invoice_items",".t.","Extension")
    -- tom

    ps. Welcome to AlphaFive!

  3. #3
    Member
    Real Name
    Frank Wala
    Join Date
    Jun 2010
    Posts
    25

    Default Re: Summary Function Fileds A4 to A5

    Exactly what I needed. Thank you, and thanks for the welcome.

    Frank

  4. #4
    Member
    Real Name
    Frank Wala
    Join Date
    Jun 2010
    Posts
    25

    Default Re: Summary Function Fileds A4 to A5

    Hi Tom (or anyone reading this),

    I have finally run my report using "real situation" data. I find that Tablemax does not quite replace the A4 "highest" function.

    For my report, I need to find the "highest" value in the parent of the current set based on a filtered or group value. The Tablemax function returns the "highest" value on the parent table regardless of group/filters.

    If tried a calculation using the IF funtion to compare values and conditionally retain the highest value, however, the false side of the IF is zeroing out the retained value. See below:

    Variable:
    HIHI = 0

    Calc:
    IF(Ediv->Invalue > Var->HIHI,Var->HIHI=Ediv->Invalue,Var->HIHI=Var->HIHI)

    I'm thinking an xbasic IF script with a null ELSE might do the trick, but I don't know how or where to get this in my report.

    Thanks for your help in advance,
    Frank

Similar Threads

  1. need to filter and sum fileds in a set
    By gkeramidas in forum Alpha Five Version 8
    Replies: 4
    Last Post: 05-24-2008, 05:28 PM
  2. how many calc fileds or error?
    By DaveM in forum Alpha Five Version 7
    Replies: 23
    Last Post: 03-01-2007, 06:19 PM
  3. Subtract fileds with filter
    By samed in forum Alpha Five Version 7
    Replies: 0
    Last Post: 02-04-2007, 07:41 PM
  4. A5v4.5 character fileds
    By Thibaud Chabot in forum Alpha Five Version 4
    Replies: 5
    Last Post: 02-23-2001, 12:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •