AnsweredAssumed Answered

Question about records and datasets

Question asked by VRFuser on Sep 8, 1997

     You can get the last 50 records by specifying that section of the
     array as follows:
    
                       +----------------------+
                       |                      |
     +--------------+  |  +--------------+    |  +------------------------+
     | From DataSet |  |  | totSize(x)   |    |  | Formula                |
     +--------------+  |  +--------------+    |  +------------------------+
     |              |--+--|x| totSize(x) |-+  +--|A|                      |
     +--------------+     +--------------+ |     |-| A[max([0,B-50]):B-1] |
                                           +-----|B|                      |
                                                 +------------------------+
    
     The max() function ensures that when there's less than 50 records,
     you'll get all of the records.
    
     Regards,
    
     Bruce Wenner
     HP St. Paul


______________________________ Reply Separator _________________________________
Subject: Question about records and datasets
Author:  Non-HP-rdm (rdm@granville.com) at HP-USA/o2=mimegw3
Date:    9/8/97 1:26 PM


I'm new to HP VEE 4.0 so hopefully there is a simple solution to my
problem.

I want to search a dataset and "grab" the most recently added 50 records
within it.  Then I want to extract the values of ONE of the fields of
all 50 records and compute the average value.

I don't know what search specifier to use in the "From Data Set" box so
that I will always get the last 50 records.  (The total number of
records will continually increase.)  One of the fields will be a time
stamp; perhaps there is some way to "grab" the 50 records with the
"smallest" time stamp?

Thanks for any help

Roger Martin
rmartin@granville.com

Outcomes