Qualify a FOR statement with a frame reference
- Last Updated: October 14, 2024
- 1 minute read
- OpenEdge
- Version 13.0
- 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 Use Basic ABL Constructs.
In this case, that is not what you want. Because there is 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.