Directory Default Lookup

In my App I set default paths for lookups.

The default lookups work but I have to paste the path into the entry field. I want to click on the lookup button, locate the path I need and have it inserted in to the default lookup field. When I click on the lookup button it wants me to insert a file, I just want the path. What do I need o do to get it to just select a path.

Hi Steve,
It’s not clear if you are using the DOS lookup file template or hand-code for your lookup.
If you are using the template, then look at the Dialog Type drop list (right in the middle of the prompts). There is a Directory choice.
If you are using hand code, the you want to add File:Directory to the flags you are passing into the FileDialog command.

1 Like

In the DOS File Lookup template, look at Dialog Type.

From the help: “Select the type of dialog that you want to present to the user. Open allows a user to simply access a file name from the Open dialog. Save allows the user to update the contents of the filename selected. Directory allows the user to return the path only (no filename) as presented by the Windows dialog.”

1 Like

Leroy,

Thanks, that was a simple fix. I guess sometimes I over look the obvious…

Ric,

Thanks, that was a simple fix. I guess sometimes I over look the obvious…

1 Like

It’s pretty easy to use the Windows SHAutoComplete() on an ENTRY, just 1 call. As you start typing “c:\xxx” it drops a path list picker as shown in below GitHub Repo. It can be limited to just Paths without Files.

3 Likes