After you switch to the report layout and before you sort it, perform a find. It can be simple:
Set Error Capture [ On ]
Perform Find [ Restore ]
... in the Specify Find Requests dialog, select NEW then select your field and in criteria, type Completed and ADD then above in the Action pop-up, select Omit then OK and OK to exit.
You will be left with all records which are not yet completed. Then continue your script with your sort, preview etc. :smileyhappy:
LaRetta, thank you so much for your knowlede on this, it worked. One related question if I may; when I originally created the Layout, a script was automatically produced. I copied that script and modified it using your description above. When I select the Layout the original scrip runs. How can I set this existing Layout to use the modified script with your added code?
Thanks again, Scott
You said that it is when you select the layout that the script runs? If you are using FM10, then you may have a layout script trigger. Check the layout options in layout mode for that layout.
If you are making it run via a button, then just change the script for the button in layout mode.