Well, I think the modern way to do it would be to put the user interface into a form. A separate form for such a small thing may seem exaggerated, but it does make the code more readable. If you don't want to have a separate form for this specific task, you might also define a form in code (through a class) - and get all the potential advantages of user interface, OOP, etc.
>Hi all
>
>I have just created the following code to get a selection of the data folder form the user as below. though it is working I just wanted to know if there was a more sophisticated way to do it.
>
>
WAIT CLEAR
>CLEAR TYPEAHEAD
>
>DEFINE POPUP DF MESSAGE "Select Data Folder" ;
> PROMPT FIELD cName + " " + cExtra + STR(iID, 10) SCROLL
>
>DEFINE WINDOW DF AT 6, 6 SIZE 10, 74 NONE NOCLOSE NOFLOAT NOGROW NOZOOM
>
>ACTIVATE WINDOW DF
>
>lcPrompt = cName + " " + cExtra + STR(iID, 10)
>
>@ 0, 0 GET lcPrompt FUNCTION "&T" POPUP DF SIZE 9, 64
>
>READ MODAL
>
>RELEASE WINDOW DF
>RELEASE POPUP DF
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)