Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Update reader field with an agent

Posted on 2003-02-25
9
Medium Priority
?
346 Views
Last Modified: 2013-12-18


I tried to write an agent to enter some usernames into a reader field using an agent. It works but the inserted data is not interpreted well : after i add the users to the reader fields  , everyone can still access the document.
Only after i save the document , the access is restricted.
It looks that only after opening the doc in the UI the reader functionality is starting to work.
What am i doing wrong ?
Should i look out for some things ?
0
Comment
Question by:212f_h2o
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 63

Expert Comment

by:Zvonko
ID: 8020151
Yes, there is a field attribut telling the field it is a Readers field.
You have to set this options too.
Like this:
Call item.AppendToTextList( "Jeffrey Kinnamon" )
item.IsReaders = True
Call doc.Save( True, False )

Good luck,
Zvonko


0
 
LVL 7

Expert Comment

by:scottrma
ID: 8020191
Make sure your field type is set to READERS. Check how you are creating and/or updating the field. If you use:

Set field = New NotesItem(doc,field,"Admins",READERS)

that should make it a Readers field. You can also use NotesItem.IsReaders property to check to see if the field has the READERS type.

Check the document properties box for this field - I suspect it does not have the READERS property set. If not, you must set it in your agent as described above.

Hope this helps.

Scott
0
 
LVL 7

Expert Comment

by:scottrma
ID: 8020206
Hello Zvonko,

Your comment was not there when I started writing....

Cheers,

Scott
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:212f_h2o
ID: 8020272

Is there a way to do it with Formula ?
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8020300
It's ok.

I was only confused how in your example the variable "field" can be at same time NotesItem and String :-)

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8020328
I can not get ride of the assumption that h2o is Steamer :-)

Buddy you know that this would be dangerous game?

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 8020421
It is possible in Formula,

Here is the sample code, which appends the a user to the readers field in canonical format

FIELD Readers := Readers : @Name([Canonicalize];"TestID/Company")

Also make your readers field as Computed, with default value as

Default Readers := @UserName;
Readers

~Hemanth


0
 

Author Comment

by:212f_h2o
ID: 8028170
Thanx

works great , except that the Rader's are added it to the field. How can I change it so I replace the contents instead of adding it to the list of users already present in the reader's field.
I tried to delete the field using @Deletefield first , but apparently my agent executes the Delete at the end of the agent. I could do it with 2 agents but I guess there's a more elegant way to do it.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 400 total points
ID: 8028451
Replace with this formula.

FIELD Readers := @Name([Canonicalize];"TestID/Company")
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

580 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