This discussion is archived
1 Reply Latest reply: Nov 16, 2010 4:43 PM by gCubed RSS

Displaying a variable in a category in Prosight

814706 Newbie
Currently Being Moderated
I have to multiply 20-30 categories by a particular rate to generate a new set of 20-30 categories. That rate will vary over time so I want to store it in one category and then refer to that category in my Advanced Calculation in the new categories. So I only have to change one value to change alll of ther calculated categories.

So I have tried -

{
var res = 79.637
return res
}

And when I test the calculation at Value and Sum Value level it tests ok and displays the value fine in the test box but if I try to get that value into another Categories Calulation with

var B=getCell("Network Allocation Rate").Value;

it returns a null value. Or if I display that Network Allocation Rate category in a scorecard it shows a null value on all items and at Sum Value level.

Any ideas on why it wont show the value in the category ?

Or is there any other way to store a global variable that I can use in my calculations across multiple categories ?
  • 1. Re: Displaying a variable in a category in Prosight
    gCubed Journeyer
    Currently Being Moderated
    You can place your “Network Allocation Rate” vale in the function include file. Before version 8 the function include file is a text file located inside the ProSight install directory. Search your version's documentation on "include file" for the specifics. In version 8, they have moved it into the database.
    The only bad thing about using an include file is that you need to stop and restart the function engine to get your new functions / variables complied and available to your category functions.

    If your “Network Allocation Rate” is a number, I would consider using a value list. For example:

    Name => Weight
    FY2010 => 2.34
    FY2011 => 3.12
    FY2012 => 4.21

    Now to use the value list, just get from the list the rate you want by the name and multiple it to your category.

    var rate = getValueList("FY List", "FY2011");
    var value = getCell("Base Value").Value;
    if (value != null) return value*rate;

    *** remember to watch your nulls if you have set the system to treat nulls as 0.

    Using a value list provide the ability to update the list and retest you function without bouncing the function engine.

    On a side note, you can use a list pointing to another list that provide you the ability to return a lookup text value.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points