How to perform simple mathematical functions in a Groove Forms tool (913603)



The information in this article applies to:

  • Groove Virtual Office 3.1 Professional Edition
  • Groove Virtual Office 3.1 Project Edition
  • Groove Virtual Office 3.0 Professional Edition
  • Groove Virtual Office 3.0 Project Edition
  • Groove Workspace 2.5 Project Edition
  • Groove Workspace 2.5 Professional Edition

INTRODUCTION

This article contains an example of how to perform simple mathematical functions in a Groove Forms tool in Groove Virtual Office or in Groove Workspace.

MORE INFORMATION

To perform mathematical functions in a Forms tool programmatically, you may have to create event-driven methods in the Forms tool script code by using JavaScript. The following is a quick code example in JavaScript. This example multiplies the values in two form fields, f1 and f2. Additionally, the example assigns the resulting value to another field on the form, Result:
function multButton_onClick() 

//Function is called when the multiplication script button is clicked.
{

//First operand and second operand are unformatted number fields on a form. 
var f1=document.GrooveFormBase.FirstOperand.value;
var f2=document.GrooveFormBase.SecondOperand.value;

//Temporarily store result of multiplication.
var f3 = f1* f2; 

//Assign the value in f3 to an unformatted number field "Result" which is on the form.
document.GrooveFormBase.Result.value = f3;
}
For detailed information about how to program for forms, see Developing with the Groove Forms Tool. To obtain Developing with the Groove Forms Tool, visit the following Groove Networks Web site:

Modification Type:MajorLast Reviewed:1/31/2006
Keywords:kbExpertiseAdvanced kbhowto kbinfo KB913603 kbAudKnowledgeWorker kbAudEndUser