Parameter Calculations

 

Parameter calculations are a great technique when you are trying to pass a value between multiple applications. For example, you would like to pass a value from the URL to the output page to determine some conditional calculations. In our case, our calculation would accept a value, then a conditional calculation would determine what to print in our table data based on the parameter calc.

How to Work with Parameter Calculations

The key to parameter calculation fields is that when you create it, you are merely creating a holder that will hold a value for later. In our case, the “later” will be when the value is passed via the URL.

To create this place holder, go to the Calculations screen. At the calculation definition screen, enter your description field. For length and decimal, choose appropriate values (In our case, our output needs to be 2 alpha). Lastly, select “Parameter” from the Calc Type dropdown list.

Next, setup your conditional calculation to best fit your needs. For our example, we will say that if the value passed to CALCULA001 is “IL” then our Calculation will read “ILLINOIS”, if not it will say “OTHER STATE”.

Make any other needed changes to your application and then click build/compile.

When you run your application, simply add CALCULA001=IL&run=2 to the URL, and press enter. Based on the value you’ve passed in the URL, you can control your Conditional calculation.