Qualifying a FOR statement with a frame reference
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
This most recent example also has an explicit frame reference in it:
|
Why is this necessary? A FOR EACH block scopes
a frame to the block. By default, this is an unnamed frame. Without
the specific frame reference, you get two nested frames, one for
the Customer and one for its Orders. You
saw this already in the sample procedure in Using Basic ABL Constructs.
In this case, that isn't what you want. Because there's only
one Order of interest for each Customer,
you want to display all the fields together in the Customer frame.
To get this effect, you have to override the default behavior and
tell the AVM to use the frame from the Customer block
to display the Order fields. That is what
these two references to WITH FRAME f do for you.
The AVM just keeps making room for new fields in the frame as it
encounters them.