" /> Hyperion Gurus - HELP!!! - Genesys CTI User Forum

Author Topic: Hyperion Gurus - HELP!!!  (Read 4441 times)

tony

  • Guest
Hyperion Gurus - HELP!!!
« on: April 05, 2011, 01:39:19 PM »
Advertisement
Hi everyone,

I've been banging my head against a wall (with protection, of course...) but just can't get this right...

I have a Dashboard/EIS with 2 dropdown lists with the same values in them - they are both the same TimeStamps from the same Results Table.  What I would like to do is have the User select a "To" and "From" TimeStamp, then hit GO to apply them as Limits to an underlying Results Table.

The examples I have run across all work really well when it's TEXT in the dropdown - but not when it is a TimeStamp.

Let's see if I can explain - here is my current Script;

//Define Limit Parameters on Results Table
MyLimit = ActiveDocument.Sections["Results"].Limits[1];
//Clear all the values which are currently set
MyLimit.SelectedValues.RemoveAll();
// Add new values to the selectedvalues collection
MyLimit.SelectedValues.Add(DropDown1.[b]SelectedIndex[/b]);
//Change the limit operator
MyLimit.Operator = bqLimitOperatorGreaterThan;
//Recalculate with new Limit
ActiveDocument.Sections["Results"].Recalculate();

What this does is apply a [i]Row Numbe[/i]r as the Limit on the Results Table ("TimeStamp > 1.0000") - and that doesn't work because I want to use the text entry Selected in the dropdown box - which is an actual TimeStamp... not a Row Number...

I think the issue is that I am using "[b]SelectedIndex[/b]" (highlighted above) - but I can't find the right syntax which allows me to specify the Text which is selected, rather than an Index Number.  Everything else I try comes back with "invalid argument"

I wish I could argue in a valid way... I know what I'd be saying to it... lol

Any help/pointers would be greatly appreciated!  If someone has the syntax for me to use the bqLimitOperatorBetween in my Script, to enable me to use both of the dropdown boxes as "From" and "To" Limits on my Results, that would be even better... :)

Thanks so much - you are all wonderful people! :)

TT

Offline fnunezsa

  • Full Member
  • ***
  • Posts: 213
  • Karma: 5
Re: Hyperion Gurus - HELP!!!
« Reply #1 on: April 05, 2011, 03:21:04 PM »
  • Best Answer
  • Hi Tony!

    I believe this is more about Java Scripting than about Hyperion  :) . Have you tried MyLimit.SelectedValues.Add(DropDown1.Item(DropDown1.SelectedIndex)); ?

    tony

    • Guest
    Re: Hyperion Gurus - HELP!!!
    « Reply #2 on: April 05, 2011, 03:50:06 PM »
  • Best Answer
  • Genius - that worked! :) :) :)

    Just shows you how, when you look at a problem too long, you lose sight of the goal.... lol

    Just one other thing, whilst I have your valuable attention...

    I need to constrain the Limits between 2 dropdowns - I am currently using [i]MyLimit.Operator = bqLimitOperatorGreaterThan;[/i] and I know I need to use [i]MyLimit.Operator = bqLimitOperatorBetween;[/i]  - but I think I can only apply 1 limit, whereas I need to define 2 limits...

    I know it's really cheeky, since you provided me with the perfect solution already but - can you help please?

    Thanks so much!

    TT

    tony

    • Guest
    Re: Hyperion Gurus - HELP!!!
    « Reply #3 on: April 05, 2011, 03:55:01 PM »
  • Best Answer
  • It's ok - I worked it out....

    //Define Limit Parameters on Results Table
    MyLimit = ActiveDocument.Sections["Results"].Limits[1];
    MyLimit2 = ActiveDocument.Sections["Results"].Limits[1];
    //Clear all the values which are currently set
    MyLimit.SelectedValues.RemoveAll();
    // Add new values to the selectedvalues collection
    MyLimit.SelectedValues.Add(DropDown1.Item(DropDown1.SelectedIndex));
    MyLimit2.SelectedValues.Add(DropDown2.Item(DropDown2.SelectedIndex));
    //Change the limit criteria
    MyLimit.Operator = bqLimitOperatorBetween;
    //Recalculate with new Limit
    ActiveDocument.Sections["Results"].Recalculate();

    ....works perfectly!

    Thank you!!!! :)

    TT

    Offline cavagnaro

    • Administrator
    • Hero Member
    • *****
    • Posts: 7641
    • Karma: 56330
    Re: Hyperion Gurus - HELP!!!
    « Reply #4 on: April 05, 2011, 04:07:14 PM »
  • Best Answer
  • I'm going with Jasper Reports and rebuilding all reports there...much much easier and powerful

    Offline fnunezsa

    • Full Member
    • ***
    • Posts: 213
    • Karma: 5
    Re: Hyperion Gurus - HELP!!!
    « Reply #5 on: April 05, 2011, 04:24:47 PM »
  • Best Answer
  • ;)