Solved

Configuration File for Agent

Posted on 2003-11-14
6
274 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 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

631 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