Track which formula button was click on the web.

The example below uses a global variable to track which web button the user clicked. In the example below, the agent referenced is only launched when the user clicks the "Download" button. This is required since both buttons perform a @Command(FileSave) command. The major point of this is that you can save and refresh the document by using formula and still have a background agent product output which is normally not possible. FYI - The url passes a variable to the agent from this form for the parent document. This code was used in the Global Data Collect database.
Lotus Formula

JS Header

var xbutton = "None";

OnSubmit

if (window.navigator.appName == 'Lotus Notes') {
	//Notes Client - dont put anything in here
} else {
	//web client
	if (xbutton == 'download') {
		//alert("download was pressed");
		parent.top.location.href= document.forms[0].dbURL.value + "/Download?OpenAgent&pdoc=" + document.forms[0].ur_ParentDocumentID.value
	}
	//reset global variable
	xbutton = "Done";
}

Images/Screenshots:

Posted by fbrefere001 on Monday February 24, 2003