Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: tony on April 05, 2011, 01:39:19 PM
-
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
-
Hi Tony!
I believe this is more about Java Scripting than about Hyperion :) . Have you tried MyLimit.SelectedValues.Add(DropDown1.Item(DropDown1.SelectedIndex)); ?
-
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
-
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
-
I'm going with Jasper Reports and rebuilding all reports there...much much easier and powerful
-
;)