Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Keiko Kikimar 16.Jan.04 04:11 PM Lotus Notes
Notes Client 6.5 Windows 2000; Windows XP


I'm attempting to create a view agent that does the following (on all documents selected):

1. pull the values in multi-value field "Activity". The field has multiple text items of the type "date - activity text" (with space,dash, space separating the pieces of text)

2. parse the "date" portion of the text and place in value of "tmpDate" (leftmost up to space, dash, space)
3. parse the "activity" portion of the text and place in value of "tmpAct" (rightmost after space,dash,space)
4. create a new document of type "Mod_Activity", which is a reponse document, inherits values from the parent (really, only the $ref is ever used...)
5. On "Mod_Activity" form, sets value of "Activity_Date" field to "tmpDate"
6. Sets value of "Activity_Enter" to "tmpAct"
7. On the parent document, sets the value of "Recent_Activity" to today's date
8. Saves and closes the response document
9. Goes to the next line item in the original document and starts the process again.

Here's the agent code so far:

@If(@Elements(Activity) = 0; @Return(0); "");
n := 1;
@DoWhile(
tmpDate:= @left(Activity; " - ");
tmpAct:= @Right(Activity; " - ");
@command([Compose]; ""; "Mod_Activity");
@SetField("Activity_date"; tmpDate);
@SetField("Activity_enter"; tmpAct);
@SetDocField($Ref; "recent_activity"; @Today);
@Command([FileSave]);
@Command([FileCloseWindow]);
n := n + 1;
n <= @Elements(Activity);
)

I'm getting an error that I'm missing an expected function, though I have no idea why. (Shows up at the last parenthesis in the formula). I also haven't been able to test the agent since it won't save the formula in its current state.

If anyone can tell me if the logic/programming will fail, let me know why or a possible fix. This would be greatly appreaciated.


Thanks in advance.






@DoWhile looping agent problem (~Cheryl Zekgero... 16.Jan.04)
. . There are three things that I can s... (~Dan Elhipister... 16.Jan.04)
. . . . RE: There are three things that I c... (~Cheryl Zekgero... 16.Jan.04)
. . . . . . Ah, sorry. The view agent in @Comma... (~Dan Elhipister... 16.Jan.04)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS