Solved

Creating Agents

Posted on 2004-04-29
26
220 Views
Last Modified: 2013-12-18
I created an agent that is suppose to run everyday to check on a field in all my documents.  I want it to change the value of NEW in my status field to OLD if the date today is greater than the date receive field in my form.  No errors appeared but it does not update my status field?
0
Comment
Question by:emem
  • 13
  • 10
26 Comments
 

Author Comment

by:emem
ID: 10946878
btw here is my formula in the agent I created

SELECT @All;
@If (stat ="New PDC" & @Today>dtercv);stat = "Outstanding PDC";stat
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10946960
use this:

FIELD stat:=stat;
FIELD dtercv:=dtercv;
@If(stat="New PDC" & @Today>dtercv; @SetField("stat";"Outstanding PDC";stat)


or else,
create a view and the selction formula for that view will be

SELECT Form="UrFormName" & (@today>dtercv) & (stat="New PDC)

Now create an agent and Run on all documents in the view and optin is the above view name

And formula is

FIEDL stat:="Outstanding PDC";
""
0
 

Author Comment

by:emem
ID: 10947167
too many arguements for @function is the 1st formula you gave me
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10947179
change it to
:
FIELD stat:=stat;
FIELD dtercv:=dtercv;
@If(stat="New PDC" & (@Today>dtercv); @SetField("stat";"Outstanding PDC");stat)

0
 

Author Comment

by:emem
ID: 10947246
i'll test it ....thanks again madheeswar ...you never quit on helping me =)
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10951818
Or, simpler...

SELECT stat ="New PDC" & @Today>dtercv;
FIELD stat := "Outstanding PDC";

Two lines are better than four :)
0
 

Author Comment

by:emem
ID: 10955233
how come the agent does not run on the schedule I stated I want it to run every day but it does not work unless that I run it manually how is this so? I cannot view the results
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10955966
Two line is better.

and agent not running, u should be selecting to schedule daily and run on all documents in the view.

tell ur config of agent(selection , when this agent should run, etc.,,)
0
 

Author Comment

by:emem
ID: 10956202
yah may config is as follows:

Agent Name : Check Status
When should this agent run on Local? On Schedule daily starting 1:00AM
Which documents shoult it act on?
All documents in the database

and I have the formula you gave me ....and it is checked in the agents option....do i need to include anything for it to run?
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10956217
select the agent and from menu. Agent->Log

it should display when it has been run.
Inorder to test it again, change the time 1Am to another time which is convenient for you and test.

Don't touch the agent again untill it finished its schedule.

And u can use Qwaletee Solution which is simple and have the same result.

0
 

Author Comment

by:emem
ID: 10956374
i'll try this again hope it works i'll change the time
0
 

Author Comment

by:emem
ID: 10956621
it still did not run ...it only applied the changes when I click on it to run ....
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:emem
ID: 10956641
it does not function automatically
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10956679
What is ur Agent log says?

Did it run?

create a view and the selction formula for that view will be

SELECT Form="UrFormName" & (@today>dtercv) & (stat="New PDC)
the above solution should display some documents. Is the documents are there?
0
 

Author Comment

by:emem
ID: 10956700
the agent has never been runned......ill try to do the view
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10956728
the agent is not running on schedule.  But when the agent runs manually will the fields status changes the value?

I think it is with config of server.
0
 

Author Comment

by:emem
ID: 10956781
the view now displays the records with dtercv<@today and stat = "New PDC".... I created an agent that will replace the value of stat what shld be the config?
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10957042
in the server configuratoin document in names.nsf on server, ur name should be listed to run restricted Lotus script.

else, sign the application with admin id and schedule it.

did u added ur search?
there is a button in the agent. click on Add search and selct folders from the menu.

and add the view on which it should run.
0
 

Author Comment

by:emem
ID: 10957599
ill try your suggestion i hope this particular agent would work
0
 

Author Comment

by:emem
ID: 10982918
madheeswar hello ...is there another solution to run this agent? is it possible that once I open the database a screen or message would prompt the user that the agent needs to be run for updates b4 they proceed with any transaction?
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10983706
Or with the same setup, create a Lotus Script agent.

Please increase the points, as I need to write script for it.
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 50 total points
ID: 10983721
I believe u will increase points and I am giving my code:

place this into an agent.
Note: replace the view name.




Sub Initialize
      Dim ss As New notessession
      Dim db As notesdatabase
      Dim view As notesview
      Dim doc As notesdocument
      
      Set db=ss.currentdatabase
      Set view=db.getview("UrViewname")  'here replace ur view name.
      Set doc=view.getfirstdocument
      
      While Not doc Is Nothing
            doc.stat="Outstanding PDC"
            Call doc.save(True,True)
            Set doc=view.getnextdocument(doc)
      Wend
End Sub
0
 

Author Comment

by:emem
ID: 10984029
madheeswar will this code run automatically? I will place this code in an agent and run it on a schedule daily.....
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11002496
Is this working or not?
if it is working, then close this quesoitn with grade A and increase points.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

24 Experts available now in Live!

Get 1:1 Help Now