T
TheDrooper
Guest
Using OpenEdge 11.7 and Windows 7, I'm searching for a disk file using this working code:
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE lChose AS LOGICAL NO-UNDO.
SYSTEM-DIALOG GET-FILE cFileName
FILTERS "Text Files (*.txt)" "*.txt", "Comma-Separated Value Files (*.csv)" "*.csv"
UPDATE lChose.
Is there a way to dynamically build the filter list with a variable? I've tried this, which doesn't work:
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFilters AS CHARACTER NO-UNDO.
DEFINE VARIABLE lChose AS LOGICAL NO-UNDO.
cFilters = '"Text Files (*.txt)" "*.txt", "Comma-Separated Value Files (*.csv)" "*.csv"'.
SYSTEM-DIALOG GET-FILE cFileName
FILTERS cFilters
UPDATE lChose.
I've also tried:
FILTERS VALUE(cFilters)
Both return an "unable to understand" error (198). Can this even be done?
Continue reading...
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE lChose AS LOGICAL NO-UNDO.
SYSTEM-DIALOG GET-FILE cFileName
FILTERS "Text Files (*.txt)" "*.txt", "Comma-Separated Value Files (*.csv)" "*.csv"
UPDATE lChose.
Is there a way to dynamically build the filter list with a variable? I've tried this, which doesn't work:
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFilters AS CHARACTER NO-UNDO.
DEFINE VARIABLE lChose AS LOGICAL NO-UNDO.
cFilters = '"Text Files (*.txt)" "*.txt", "Comma-Separated Value Files (*.csv)" "*.csv"'.
SYSTEM-DIALOG GET-FILE cFileName
FILTERS cFilters
UPDATE lChose.
I've also tried:
FILTERS VALUE(cFilters)
Both return an "unable to understand" error (198). Can this even be done?
Continue reading...