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.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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.
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.