Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating Folders / not immediately accessible / ACL-Settings

Posted on 2006-06-09
5
Medium Priority
?
867 Views
Last Modified: 2013-12-18
Hi,

I developed a Searchform (only searching in 3 Items).
A Folder containing the corresponding Documents is created on the Fly (for every User).

Now i have two Problems.
1. The User needs to have Manager-Rights (or at least Developer-Rights) in the ACL so he/she can create personal Folders in the Database.
2. The Folder can be only accessed after the Admin/Developer has made a Refresh on the Folders in DB with NotesDesigner

i'm creting the folder with db.enableFolder(foldername).

Is there a Way to solve this?
0
Comment
Question by:ragerino
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 500 total points
ID: 16869740
1. No : the user needs the right to create private views in the ACL, but this will work from Author up.
2. ?

this is for the Notes Client, I presume.  If you use the Enablefolder command, you have to close and reopen the database afaik, before the folder shows up in Outlines, design views etc..  I haven't found a good solution.
To solve this , you can use Shared/personal on first use folders.  You just put the documents in the 'shared" folder name (running a script as the logged in user, not as adminsitrator !),  and the private folder will be created.  Disadvantage here is that you can't easily remove the folder anymore

An alternative is to really edit the folder - add access control, modify columns, using NotesView objects and access to the underlying Notesdocument for the folder.   That will allow you to do whatever you want with the folder.

cheers,

Tom
0
 
LVL 3

Author Comment

by:ragerino
ID: 16869964
here's my code.
      db.EnableFolder(foldername)
      Set searchfolder=db.getview(foldername)

searchfolder is nothing but i can put documents in it, but i can't show the folder in a frae

ws.settargetframe(myframe)
ws.openview(foldername)

i have to do a F9 with the desinger inside the folders.
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 500 total points
ID: 16877079
ragerino,

There is a bug in R6 that was not present in R5 with regard to personal folders.

As a result, the workaround that is used for R5, which is the searchfolder = db.getView(folderName), that would create the view, doesn't work in R6 if the private folder doesn't exist.

Also, the normal things of  coll.putallinfolder("thisFolder", createonFail) doesn't work either.

So, here's my workaround.  

I check for the folder, if it doesn't exist, I use the ws.openDatabase, and set target frame to "_SELF" so I can flash the private folder (which is then created) and then reload the current view.  See sub: CreatePrivateFolder.

In this example, I use an agent, and a default view to test moving documents as well as a Private Shared on First Use folder.  I test to see if the folder exists, if not, create it, then resume the script.

Sub Initialize
      Dim Session As New NotesSession
      Dim ws As New NotesUIWorkspace      
      Const strFolder = "PFV"
      Dim strDb As String, server As String
      server = session.currentdatabase.Server
      strdb =  session.currentdatabase.filepath
      Dim db As NotesDatabase
      Set db = session.currentdatabase
      Dim privateFolder As NotesView
      Set privateFolder = session.currentdatabase.getview(strFolder)
      If privateFolder Is Nothing Then      
            createPrivateFolder db,strFolder
      End If
      Set privateFolder = Nothing
      
      Dim view As NotesView      
      Dim doc As NotesDocument
      Set view = session.currentdatabase.getview("Default")      
      
      'Now put some files in the folder
      Dim count As Integer
      count = 0
      Set doc = view.GetFirstDocument
      While Not doc Is Nothing
            count = count +1
            If count >25 Then Goto NextStep
            If Not doc.IsResponse Or Not doc.IsDeleted Then
                  Call doc.putinFolder(strFolder)
            End If
            Set doc = view.GetNextDocument(doc)
      Wend
      
NextStep:      
      Call ws.openDatabase(server, strdb, strFolder,,True)
      Call  ws.viewrefresh      
      
End Sub

Sub createPrivateFolder(thisdb, strFolderName)
      Dim defaultView As NotesView      
      Dim currentUIView As NotesUIView
      Dim curviewname As String
      
      Dim thisws As New NotesUIWorkspace
      Set currentUIView = thisws.CurrentView
      curviewname = currentUIview.ViewName
      Call thisws.SetTargetFrame("_SELF")
      Call thisws.OpenDatabase(thisdb.server, thisdb.filename,strFolderName)      
      Call thisws.OpenDatabase(thisdb.server, thisdb.filename,curviewname)
      Sleep(5)      
End Sub
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question