Solved

Readers-type fields not doijng what I'd expect ON WEB

Posted on 2002-06-20
20
279 Views
Last Modified: 2013-12-18
Hi all - I hope you're all keeping well!

Due to a view taking too long to load on the web (possibly due to SELECTION formula which is not exactly all that heavy) I've decided to add a Readers-type field to my main document. That readers field returns a name or list of names in Canonicalized format. It also returns 1 role as an element of the list of readers.

Now, when I force values into the readers-type field while working in the Notes database, the view acts as I expect. However this activity is not reflected on the Web.

Obviously if I create a document on the web the readers-type field automatically generates the list of names who can read it. However I noticed that by changing the readers field values via a simple agent in Notes that the only common factor that maintains a records visibility on the web is the ROLE that is in the list. Worse again, the user logged into the web does not have that role as either a single person or Group Member on the ACL.

I'm very confused now. The Group to which the logged-in user belongs has Manager access in the ACL so should be able at the very least see their records in the view as their name is included in the Readers field. The view has a very simple selection formula so that can't be the issue.
Can the Web identify the logged-in user against the readers fields? I don't see anything in Domino help to suggest not.
I'm sure it must also be ok to call the Readers-type field anything I want or must I call it "Readers"?

I'm grasping at straws again as the obvious isn't working for me. You're help would be greatly appreciated people!! Thanks in advance, noloco.
0
Comment
Question by:noloco
  • 9
  • 4
  • 3
  • +2
20 Comments
 
LVL 10

Expert Comment

by:zvonko
ID: 7095391
Hello noloco,

this is the really big pitfall this Readers fields. If you are not contained as Role, Group or CommonName in one of the Readers fields and if not all of them are empty, then you can never again get this document; not even as a Manager. That is fact.

Beside this do the Reader fields slow down view display time on the web. On Notes client you get at first access the view index according to your Reader rights transferred to your local desktop cache. On web this index hast to be built again and again at every category expand or collapse.

Your main question as I understood is: what Name should your adjust agent put into field of type Readers?

My answer is this: place on the form a ComputedForDisplay field with this formula: @UserNamesList
And there are all strings you can use as member to be recognized in Readers fields. It can be a Role, Group, CommonName, Hierarchical, Abbreviated, ShortName and so on...

And of course you can have more then one field with names chosen by you of type Readers. The rule is: as long as all Readers fields are empty everyone with at least Reader access to the database can see this document. As soon as one of the Readers fields is not empty, then you have to be in at least one of the Readers fields to even see the document; in spite you have Manager access to the database.

I hope not to confused things too much for you.

Regards,
zvonko

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7095565
Hi Bro!
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7095989
Hi :)
0
 

Author Comment

by:noloco
ID: 7096188
Ok, well I've actually been working away at this in the meantime and progressed a fair bit without checking your answers until now. (And many thanks for the help so far zvonko). Where I am right now is that I can set the readers field value to what I want and it is effective - however the readers field is new to the form and I am trying to update all older documents of the same form, but the agent (below) does not set the readers field to a READ-ACCESS NAMES field, just a plain text-list. If I went into each of the old records and saved them on the web and then ran the agent everything would work - but there are 7000 of those so that's not where I want to go.

The agent below should change the following statistics on the readers field in documentX FROM THESE:
==========================
Field Name: ReadersARE
Data Type: Text List
Data Length: 94 bytes
Seq Num: 11
Dup Item ID: 0
Field Flags: SUMMARY

"[ORMManager]"
"Mickey Mouse"
"Daffy Duck"
"Scooby Doo"
===========================

     TO THESE:

###########################
Field Name: ReadersARE
Data Type: Text List
Data Length: 111 bytes
Seq Num: 1
Dup Item ID: 0
Field Flags: SUMMARY READ-ACCESS NAMES

"[ORMManager]"
"Mickey Mouse"
"Daffy Duck"
"Scooby Doo"
############################
- notice the only difference is the Field Flags: SUMMARY READ-ACCESS NAMES change.

Here's the agent that does not make that change:
(It's run manually from Actions menu and on Selected docs):
----------------------------------
FIELD ReadersARE:=ReadersARE;
V:="[ORMManager];Mickey Mouse;Daffy Duck; Scooby Doo";
FIELD ReadersARE := @Explode(V;";"); SELECT @All
------------------------------------

I've also tried adding a
@Command([ToolsRefreshSelectedDocs])
and  
@Command([ViewRefreshFields]) but neither of these could force the field to be recognised as a READ-ACCESS NAMES field.

I can see no flaw in the agent - anyone know how I can force this change to the field without having to open and save 7000 docs on the web?!

Many thanks in advance again,
noloco!
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7096343
Use instead of upper @Formula this LotusScript agent doing the same:
Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim dc As NotesDocumentCollection
  Dim doc As NotesDocument
  Dim ReadersARE As NotesItem
  Dim myReaders(0 To 4) As String
  Set db = session.CurrentDatabase
  Set dc = db.UnprocessedDocuments
  Set doc = dc.GetFirstDocument
  myReaders(0) = "Administrators"
  myReaders(1) = "[ORMManager]"
  myReaders(2) = "Mickey Mouse"
  myReaders(3) = "Daffy Duck"
  myReaders(4) = "Scooby Doo"
  While Not (doc Is Nothing)
    Set ReadersARE = doc.AppendItemValue("ReadersARE", myReaders)
    ReadersARE.IsReaders = True
    Call doc.Save(True, False)
    Set doc = dc.GetNextDocument(doc)
  Wend
End Sub

Good luck,
zvonko

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7097859
This was too easy for 235 points :-)
Long time no see, noloco. How are you?
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7097869
Hey JM! Do you remember this offered three times 500 points you spoiled to me with upper comments?

I need 20,000 to get Arun mad :-)

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7097878
Oh yeah, maybe you can get noloco to increase points, just to tease Arun :-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7097882
Thank you that you proposed this. I was ashamed doing so :)

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 9

Expert Comment

by:Arunkumar
ID: 7098419
Grr Grr....Grrrrrr !!!

I will call moondancer and block your expert pts at 99975 !!!  Hobout that ?

LOL !
:-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7098450
Yea, yea, call Mooney :))

0
 

Author Comment

by:noloco
ID: 7098786
Ok people, calm down now, we're all responsible mature adults. HyyyAAAHHH-AZZIFF!!
Anyway - thanks for the code zvonko - that worked like a charm of course, but as you said originally the view does take longer to reload than it did without using the readers field. MUCH LONGER!
My original need for this question in the first place was to reduce loading time for a view on the web. The view selection formula basically checked the value of about 8 fields and was taking an average of 25 seconds to load under 1 particular user. Someone was brought in here to suggest a way of speeding things up and went down the readers field road. He left that road it hangin, and I had to continue it and hence all this relay started.
So, as someone suggested above, the points were a little top-heavy for this. Unfortunately without actually giving a copy of my database it wud b impossible for someone to suggest how I might speed it all up.
It's a normal notes view, there about 7000 docs in the system averaging about 3500 bytes each. However the database is about 1300 MEGS!!!! I assume this is coz there appears to be about - OH MY GOD!!!! - I just checked it - 120 VIEWS in the thing!!! That's gotta hurt. Who's been working on it!!!??? Wooooweeee.
Some1 tell me - I'm no fan of the Admin side - but I reckon if I remove 100 of those views from the design - life should be faster in the database on the web?
Do I have to so any compressing of the database or index rebuilding or stuff after just deleting views from the design? (Of course I'll check if all views are referenced anywhere).
zvonko - will you answer that and I'll hand ya the points so and put this little conversation to rest.
As always many thanks pals!
p.s. I'm fantab jerrith - and you?
0
 

Author Comment

by:noloco
ID: 7098830
Ooops sorry - hang on - apparently this guy wanted to use the readers field as there was an unreproducable bug in the application on the web where certain users could see documents which they should not have. The documents all contain about 8 fields containing user names who should be able to view the document. The view in question checks has the following selection formula:

CurntUserA:=@Name([CN];@UserName);
SELECT (Form = "Loss2") & (ForDeletion!="YES") & (  (Authorname=CurntUserA) | @Contains(ApprovalLevel1; CurntUserA) | @Contains(ApprovalLevel2; CurntUserA) | @Contains(ApprovalLevel3; CurntUserA) | @Contains(ApprovalLevel4; CurntUserA) | @Contains(ApprovalLevel5; CurntUserA) | @Contains(ApprovalLevel6; CurntUserA) | @Contains(ApprovalLevel7; CurntUserA) )

I think you get the gist of what it's trying to do. However from time to time different users get to see documents which are outside of these criteria. On refresh or revisit to the view all seems to return to normal but it has happened a few users and continues to do so at random.
Anyone have any ideas why that might be? If someone hits this on the head and it's not zvonko I'll give zvonko his points for assistance up unitl now and open this question as a separate one and hand out the points for that one separately.

Thanks y'all inadvance,
Noel.
0
 
LVL 10

Accepted Solution

by:
zvonko earned 235 total points
ID: 7099389
I could bite JM for this >:Z

Hey, there is never a relation for the points. The main criteria is the fun factor :)

Ok, I have a big advantage for you if your Domino is R5: use single category views!
If you need support on this say it.
With single category views is the whole nonsense with personalized views obsolete :)

To see what your views are doing in your database go to Domino console and look for the response of this command:
> show database names.nsf
myDoman's Address Book
Document Type                            Live         Deleted
    Documents                            19.190       13.131      
    Info                                 1            0          
    Form                                 80           0          
    View                                 66           0          
    Icon                                 1            0          
    Design                               1            0          
    ACL                                  1            0          
    Help Index                           0            0          
    Help                                 1            0          
    Macro                                14           0          
    Shared Field                         6            0          
    Repl. Formula                        0            0          
    Private Design                       0            0          
    Unknown                              0            0          
View sizes                               Bytes
    Groups                               7.872.856
    Locations                            0
    People\Alternate Language Information  0
    People                               1.473.072
    Server\Certificates                  76.584
    Server\Clusters                      0
    Server\Configurations                10.448
    Server\Connections                   11.472
    Server\Deny Access Groups            0
    Server\Domains                       10.448
and so on…

I mean instead names.nsf you put your database file name.

So long,
zvonko


0
 
LVL 10

Expert Comment

by:zvonko
ID: 7099409
ohh, your question with deleted views and compact...

Deleted is deleted is gone. Full stop.

Look at it like this: at every access to a view has the index to be built by the user if not up to date. Usually this view building is taking time and user has to wait that his update finish. To speed up this refreshment time are server indexer task there. That is all. If no views then no update. Of course does a compact speed up indexing. I can bet your database shrink to a third after view deletion and compact. And this db size influence indexer. My observation is that first slow down is at seven gigs.

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7102791
Good idea that "show single category" option Zvo.
I use that quite a lot to limit what users see in my applications. Surely makes life a lot easier.

noloco,
Sorry about the ramble, but we tend to tease each other a bit from time to time.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7102804
And every teaser has to know what is good for the community. That's the measure :-)

0
 

Author Comment

by:noloco
ID: 7103286
Thanks for the help y'all. I'm gonna look into the single category views as I'm on R5.05 and will get back to ye.
Tlak then.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11250533
noloco,
No comment has been added to this question in more than 714 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

RECOMMENDATION: Award points to zvonko http:#7099389

Any objections should be posted here in the next  4  days. After that time, the question will be closed.

Thanks,
Zvonko
EE Cleanup Volunteer
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now