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

x
?
Solved

Configuration File for Agent

Posted on 2003-11-14
6
Medium Priority
?
275 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
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 2

Assisted Solution

by:ksi2001
ksi2001 earned 100 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 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