Solved

Need help writing a simple agent

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

726 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