Solved

Need help writing a simple agent

Posted on 2004-03-22
7
166 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

806 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