Hi,
I need our users to be able to select a folder which I then use a NotesDocumentCollection to place a load of documents into.
In formula you can use @Command([ChooseFolder]) and get a folder name. Unfort there is no equivalent in script.
ws.Folders places the current document in a folder and does not return a selected folder name (unlike the formula equivalent).
I DON’T want to do this by going through all views/folder determining which is a folder and building my own dialog as I have already done this and it takes far to long.
Has anyone been able to produce the folders dialog box using the API and been able to retrieve the selected folder name? Or any other suggestions?
Cheers
Nigel
Subject: folder dialog box
In the mail file you will see there is a view called ($FolderInfo). This view shows all the folders in the database by using this selection criteria:SELECT @Contains($Flags; “F”) & !@Contains($Flags; “p”)
Create a view like this in your database, then use ws.PickListStrings to display the view to your users - the return value will be the name of the folder they have chosen.
Subject: RE: folder dialog box
Ben,
Your probably not gonna read this (as it’s pretty much after the fact) but THANKS A WHOLE LOT for this. Showed me the path to take to get the info I needed. You’re a star!!
Jeff
Subject: RE: folder dialog box
Ben - I’ve always said that you are far too clever by half!!!
Subject: RE: folder dialog box
Nice one, thanks Ben.
Subject: folder dialog box
You could try:
result=Evaluate(“@command([ChooseFolder])”)
if it works then result would be a variant array containing the folder name.
Your other option would be to look through the collection AFTER they have added the documents to the folder and use NotesDocument.FolderReferences to get the folders that the document belongs to.
Subject: RE: folder dialog box
Thanks Melissa for your response. Unfort any UI type formula doesn’t work with evaluate :-(.
Good idea about FolderReferences but we have had too many problems with it in the past (ie removing folders, server performance) and decided against this option (I should have mentioned that in original post).
Cheers
Nigel