Solved

Configuration File for Agent

Posted on 2003-11-14
6
273 Views
Last Modified: 2013-12-18
Hello experts

I have a scheduled agent(written in lotus script) that runs everyday.
There are certain variables in the agent and Email text that I want read
from a form. So have a form with some fields that only an administrator
can edit, and the agent will read values from that form to perform its task.
Sort of like a configuration file (ini file). What would be the best
way to accomplish this?

0
Comment
Question by:marefin
  • 2
  • 2
  • 2
6 Comments
 
LVL 2

Assisted Solution

by:ksi2001
ksi2001 earned 25 total points
ID: 9748990
This is too general description.

Create form. Put desirable fields on it.

Add an action to edit profile document with this form. Make this action accessible only by administrator.

Add the following to an agent to get this document:

Dim session As New NotesSession
Dim db As NotesDatabase
Dim profile As NotesDocument

Set db=session.CurrentDatabase
Set profile=db.GetProfileDocument("AgentProfile")


0
 

Author Comment

by:marefin
ID: 9749043
So I can just create a regular form or does  it have to have special properties set for the
db to recognize it as a profileDocument
0
 
LVL 2

Expert Comment

by:ksi2001
ID: 9749121
it's just a regular form.

But in order to edit profile document you should call method EditProfile in NotesUIWorkspace or corresponding @formula.

You can also keep the configuration doc as a usual, non-profile one, but then you eill need to create a configuration view, and pick up this document from the view in agent. Make sense if you have a bunch of configuration documents.
0
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!

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9749274
Profile documents are greate. But they have some errorneous limitations. One it is not visible to user and it has to be accessed via script only , second during replication this might not be needed in other db but still replicates and no control on replication to avoid this document.

So I would suggest you setup a view and a form which will have some keyname and view will show it sorted by keyname and form will contain necessary parameters listed. This can be extended for future extension to other modules too.

Essentially what you do is create a document using keyform and save it , this is listed in the keyview. You agent will look for a specific keytask and pick it from this view and read the default settings and kicks on from there...

~Hemanth
0
 

Author Comment

by:marefin
ID: 9749540
Hemantha,

This is what I wanted to do in the first place, So my administrator can have a view of all the configution files (for future extensions). I was just looking for the code that lets me read values from a particular form into variables in my agent.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
ID: 9749682
I am going to type this for you in this little box.. so excuse me for any syntax errors

Dim s as New NotesSession
Dim db as NotesDatabase
Dim view as NotesView

KeyToSearch = "Spam Config"

set db = s.CurrentDatabase
set view = db.GetView( "KeyView" )
Set doc = view.GetDocumentByKey( KeyToSearch, true)
if not doc is nothing then
 ' Here extract doc values and do necessary tasks
else
msgbox "Unable to read config doc for " & KeyToSearch
end if


And feel free to modify it to your need
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Compose new document with values from selected doc using LotusScript 36 315
VBA Lotus notes 2 204
how to install domino server on suse linux 18 94
Domino Website - Redirection 12 101
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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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