Solved

Need help writing a simple agent

Posted on 2004-03-22
7
165 Views
Last Modified: 2013-12-18
Hi, I need to write an agent to replace the values of a field AccountManager when its value is empty to become "administrator". I have written the code below but it doesn't work. Does anyone know why?
@If(AccountManager="";"administrator";AccountManager);
0
Comment
Question by:kwamemiller
  • 2
  • 2
7 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 50 total points
ID: 10652305
SELECT AccountManager = "";
FIELD AccountManager := "administrator"


Note: you had it all in lower case, I assumed that was correct.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 10652321
Hi kwamemiller,

The formula seems OK, Do you have sufficient access to the documents? Is it a special field (Reader/Author)?

Cheers!
   Sjef
0
 

Author Comment

by:kwamemiller
ID: 10652390
Thanks qwalatee, your code works!! Don't know why the code I wrote doesn't execute though but in the meantime, I'll be using your code. Thanks also to Sjef.
Kwame
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10653359
Agents have two parts -- one part tells it which documents "qualify" (the SELECT), the rest tells the agent what to do with the qualifying document.

So, we select docs that have a blank value.

OK, now what do we do with it?  Well, we can't just write "administrator" -- we have to tell it what to DO with administrator.  So, we tell it that there is a field named AccountManager that we wish to change to this value.  (The fact that the SELECT mentioned this field means nothing, since you might want to qualify based on one field, but change a different field.)
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 10655926
All points to Qwaletee!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

13 Experts available now in Live!

Get 1:1 Help Now