Hi Pat,
I supposed the same goal as Ben did and you described now.
My next suggestion would be the same, that Ben described so nicely.
[ QUOTE ]
Are you thinking there may be a better way of doing this?
[/ QUOTE ]
Yes, I am
Check Ben's reply
Let me some comments and add-ons:
1.) In your not feasible method the users can override QBE values, so they are not really restricted to reach the omitted records - but in the work file method they are.
2.) Work file method works for all filtering on the 1st form, regardless this how is made it - on a filter fields, on QBEs or by ER code.
Hence force WFT = Work File Technique
3.) Further advantage of WFT, that the user can filter on 2nd form for a subset of the original set - if she/he wants.
4.) The only weakness of WFT (in this way), that you should turn off "Page-At-A-Time" processing on the first form to acces all possible record for the filtering.
I frequently used WFT in the past, but a bit other way - if my memory serves me well, I had posted it one or more times to JDEList. Just a brief overview:
NOTE: this is on XE, fat client, CITRIX or WTS.
1.) (Just a bit addition to Ben's post)
- I use UKID for unique WF ID for each session. This is the first field in WF as well in the only primary index of WF. The WF contains all field of the primary index of the original WF and they are also part of the WF index.
2.) I get this UKID value with Get Next Unique ID Business Function call, passing the object ID of my WF (e.g. F550121W) (note using this BSFN does not require previous setup, it will create the entry in the Next UKID table, if it does not xist and starts with 1.
3.) I make the chance for the user to select a sub-set of rows of the filtered set. This is static selection (all is on the 1st Form):
- I enable the Multiple Row Selection
- turn off Hide Row Header
- I use a grid scope variable to indicate, which row is selected
- I use Select, Clear Selection, Toggle Selection Row exits with turned on Repeat for Grid event option - to play with my grd variable
- I use Set Grid Row Bitmap system funtion to display a Check-Mark or X-Mark on the row header, to show, is the row currently selected or not
- if the form requires attachment handling (this occupies the Row Header), then I place a disabled column as first column onto the grid and I display here the green Check-Mark or the red X-Mark
- generaly I add some Form Exit too, as Select All, Clear All (Toggle All)
- I build the work file before I call the 2nd form, and I insert records only, when my variable is 1 on the grid row (I suppose, do you know, how can you go thru on all of the grid rows and do it)
- I delete the WF when 2nd form returned
- I do not turn off Disable-PageAt-A-Time - the user can go to the end of the selected rows on the grid with CTRL-End, if she/he wants to deal with all filtered rows
That's all briely
Hope, this a bit help for you.
Regards,
Zoltán