Is it possible to create dynamic drop-down boxes in Hyperion Planning forms

494 views Asked by At

I'm working on my first sandbox Hyperion planning application and I'm curious if its possible to create dynamic drop-down boxes in planning forms. For example, if a form requires the planner to select a Team/Cost Center, Company and Currency would it be possible to create a form that is dynamic such that:

When the planner picks a particular cost center, the Company and Currency drop-down boxes are then dynamically populated with all the valid choices given the selected cost center / team.

1

There are 1 answers

0
undrline - Reinstate Monica On BEST ANSWER

Without Hyperion in front of me, I can't remember if I got all the syntax correct, but it should be pretty close to this.

In Dropdown1 OnChange script:

var objDD1 = this;
var objDD2 = ActiveDocument.Sections['Dashboard'].Shapes['Dropdown2'];

var value1 = 'Selection';
var objTable1 = ActiveDocument.Sections['Table'];
var objColumn1 = objTable1.Columns['List_Items'];

var value2 = 'Selection2';
var objTable2 = ActiveDocument.Sections['Another Table'];
var objColumn2 = objTable2.Columns['List_Items'];

// go through this dropdown
for(var x=1; x<=objDD1.Count; x++)
{
  // stop when you get to the item that's selected
  if(objDD1.Item(x) == objDD1.SelectedIndex)
  {
    // pick the correct list
    switch(objDD1.Item(x))
    {
      case value1:
        var objTable = objTable1;
        var objColumn = objColumn1;
        break;
      case value2:
        var objTable = objTable2;
        var objColumn = objColumn2;
        break;
      default:
        Console.Writeln('Error with selection');
    }

    // empty the target dropdown
    objDD2.RemoveAll();

    // Go through all the rows of the table
    for(var y=1; y<=objTable.RowCount; y++)
    {
      // from the column, go through each cell in order
      var value = objColumn.GetCell(y);

      // add the contents of that cell to the dropdown options
      objDD2.Add(value);
    }
  // dropdowns only have one selection.  
  // once that's found, stop the for loop
  break;
  }
}