/ Forums / Advansys Formativ / Creating Solutions with Formativ / select directory code not working… / Reply To: select directory code not working…

#6999
Support 1a
Participant

    Thank you for your question. I can’t duplicate this exactly without having all your code, but I suspect the problem may lie in the line:

     exportPath = Utilities.AddBackSlashToPath(getExportDir) 

    The function getExportDir returns an empty string if the user cancels the directory select dialog. However, the line above will at the very least set exportPath to equal “”, even if the user presses cancel. This means the test:

    if exportPath = ""

    is never true. You’ll need to do that test before you call AddBackSlash to path.

    I hope this helps.

    Advansys Support