Home > Domino Tips > Developer > Agent > Run agent from a Web page
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

AGENT

Run agent from a Web page


Mark Bryson
11.04.2003
Rating: -2.33- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


If you want to run an agent from a Web page and access field values from the backend document behind the page, one way is to have "Computed for display" field for the backend document fields you need. But, if you just run an agent from a link on the Web page, (as in B. below), it won't pick them up. Using ToolsRunMacro (or probably RunAgent if you have R6) will access values from the Web page.

Part (a) in the code presents a link either to create a calendar database or to link to it if it is already there. The fragment of LotusScript from the "CreateCalendar" agent works out what to call the database and which directory to put it in from fields on the Web page. The fields can be hidden if necessary.

Code

In the code, "libcard" and "login" are computed for display fields on the Web page.

a. (CreateCalendar agent reads field values 
from Web page)
 @If( @IsError(@DbColumn("";"":caldb;"E";1));
  @Command([ToolsRunMacro];"CreateCalendar");
  @URLOpen( "/"+caldb+"/cal?openview" )
 )

b. (won't pick up field values)
 @If( @IsError(@DbColumn("";"":caldb;"E";1));
  "[<a href="/"+@WebDbName+"/
CreateCalendar">my calendar</a>]";
  "[<a href="/"+caldb+"/cal">my calendar</a>]"
 )

Set s = New NotesSession
Set doc = s.DocumentContext
If doc.libcard(0) = "" Then
 calendarFilePath$ = CalFolder$ & "S/" & 
doc.login(0) & ".nsf"
Else
 calendarFilePath$ = CalFolder$ & Right$
(doc.libcard(0),1) & "/" &
doc.login(0) & ".nsf" End If

Do you have comments on this tip? Let us know.


Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Agent
Run or restart Notes/Domino agents via text messages
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
How to export data from a Lotus Notes database to a CSV file
Enable or disable scheduled agents without opening the Lotus Notes database design
Creating custom views in Lotus Notes databases
Editing fields in a Lotus Notes view with Ajax

Lotus Notes Domino Agents
How the Agent Profiler tool improves Notes/Domino performance
Run or restart Notes/Domino agents via text messages
Calculating results for a column in a Lotus Notes view
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Top 10 Lotus Notes/Domino coding and development tips of 2008
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
Top 10 Lotus Notes Domino programming and development tips of 2007

Lotus Notes Domino Formula Language
View hidden fields on Lotus Notes/Domino forms
Case-insensitive @Unique version combines fields on Lotus Notes forms
Do I use Formula or LotusScript to include a doclink to a Notes view?
Top 10 Lotus Notes/Domino coding and development tips of 2008
Provide rich-text formatting via the Profile document and Formula
Top 10 Formula language tips
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Stop response documents from showing in a Lotus Notes form
Formula language button manages Deny Access list searches

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts