But now i have to upgrade it a little bit i.e when user clicks button it has to prompt where to save (only directory) but the file name should be result.csv.
I would add, look at @Prompt([LocalBrowse]…), but in addition, please consider not having an export view. There’s a facility here for exporting to CSV using script, which you can easily configure to contain the fields and computed values you would like. LotusScript also has more choices and control for file browsing dialogs.