Re: Forms 4.5: ques. about multi-record blocks

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1997/12/04
Message-ID: <881283411.32728_at_dejanews.com>#1/1


In article <66728p$qep$1_at_nuacht.iol.ie>,   "Peter Staunton" <pjs_at_iol.ie> wrote:
>
> I have a multi-record block with the current record selected.
>
> During a validation trigger, I want to make a calculation using the value in
> an item in the previous record. I know I can get this value by doing a
> previous_record, referencing the item, followed by a next_record. Is there
> an easier way? I'd like to be able to reference columns in the multi-record
> block as an array, but haven't found any examples of this.

Here are some steps that should work.

  1. In your When-Validate-Record trigger, store the :system.trigger_record value in a parameter, and start a timer that expires in 1 millisecond.
  2. In the when-timer-expired trigger, call a procedure to do all of the following steps.
  3. Store the current :system.cursor_item.
  4. Go_Block to your block where you want to make your calculation.
  5. Store the :system.cursor_record.
  6. Go_record to the trigger_record value from a.
  7. Navigate through whatever rows you need, and make the calculations.
  8. Go_record back to the record from e.
  9. Go_item to the cursor_item from c.

HTH
Steve Cosner



http://members.aol.com/stevec5088 -- The QA utility form has recently been upgraded. It's also available for Macintosh and Unix Forms.
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Thu Dec 04 1997 - 00:00:00 CET

Original text of this message