" /> Custom tab in GAD - Sort options alphabetically? - Genesys CTI User Forum

Author Topic: Custom tab in GAD - Sort options alphabetically?  (Read 14953 times)

Adam_W

  • Guest
Custom tab in GAD - Sort options alphabetically?
« on: June 03, 2008, 03:49:16 PM »
Advertisement
I've added a custom tab within the Genesys Desktop to allow agents to select a disposition code at the end of a call.  There are around 40 (!) codes for them to choose from and for some reason they are not displayed alphabetically in the tab, which obviously makes it difficult to find the one they need.

Anyone know why this is or how to solve it?

Offline Seb Reeve

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 0
    • Sabio Limited
Re: Custom tab in GAD - Sort options alphabetically?
« Reply #1 on: June 03, 2008, 03:58:07 PM »
  • Best Answer
  • I did something similar for one of our clients who had hundreds of codes - a searchable dropdown... this allows typing some of the Display Name of a custom Business Attribute and will search for the values that fit.

    [attach=#]

    The entries are sortable - let me know if you want to see the code...

    Adam_W

    • Guest
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #2 on: June 04, 2008, 08:38:46 AM »
  • Best Answer
  • That would definitely be useful if you don't mind Seb, cheers!

    Offline Seb Reeve

    • Jr. Member
    • **
    • Posts: 62
    • Karma: 0
      • Sabio Limited
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #3 on: June 04, 2008, 08:40:53 AM »
  • Best Answer
  • Feel free to drop me a mail sreeve@sabio.co.uk.

    (I will also post summary on forum)

    Offline victor

    • Administrator
    • Hero Member
    • *****
    • Posts: 1419
    • Karma: 18
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #4 on: June 06, 2008, 02:13:28 AM »
  • Best Answer
  • Adam,

    you are like the tens person to ask this!!! I do not know if there is a way to do it without coding bu if you can access the code, you can set the listbox property to sort it the way you want it. Do you have access to the code? If so, I can walk you through it. I think Seb has already done it for you, right?

    I do not have time today, but I will try to upload the code during the weekend so others can see it as well. It is pretty easy :)

    Seb: that screenshot - is it a standard GAD or something you put together? Looks pretty neat!!!
    Vic
    « Last Edit: June 06, 2008, 02:19:03 AM by victor »

    Adam_W

    • Guest
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #5 on: June 09, 2008, 10:12:59 AM »
  • Best Answer
  • Seb has kindly sent me some very useful bits of code to play with but unfortunately at the moment I'm having trouble using it with my current code (purely due to my not being very proficient with javascript I think).

    If you can tell me how to use the listbox property to sort the list, I wouldn't mind giving that a try!

    Offline Adam_W

    • Full Member
    • ***
    • Posts: 171
    • Karma: 0
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #6 on: June 24, 2008, 02:23:34 PM »
  • Best Answer
  • Still struggling with this, any ideas anyone?  ???

    Offline Pioneer

    • Newbie
    • *
    • Posts: 28
    • Karma: 1
      • Yurik's Hashev Home Page
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #7 on: June 24, 2008, 02:56:15 PM »
  • Best Answer
  • [quote author=Adam_W link=topic=3030.msg12537#msg12537 date=1214317414]
    Still struggling with this, any ideas anyone?  ???
    [/quote]

    Yes. Using jsp and javacsript code. If more accurately describe the challenge and show the source code may be able to be useful.

    Offline Adam_W

    • Full Member
    • ***
    • Posts: 171
    • Karma: 0
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #8 on: June 24, 2008, 03:38:58 PM »
  • Best Answer
  • OK thanks, basically I have added a custom tab to the Genesys Desktop to allow agents to select from a list of disposition codes (configured under Business Attributes in CME).  The code I'm using doesn't sort the list alphabetically, which is essential as there are around 40 to choose from.

    I've attached the jsp file I'm using as a txt file as the formatting screws up if I copy and paste here!

    Offline Adam_W

    • Full Member
    • ***
    • Posts: 171
    • Karma: 0
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #9 on: June 30, 2008, 09:55:15 AM »
  • Best Answer
  • I suppose if I could make the list sort exactly how I wanted (i.e. specify what position each entry appeared), that would be even better.  But failing that, alphasorting would be fine!

    Offline Adam_W

    • Full Member
    • ***
    • Posts: 171
    • Karma: 0
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #10 on: July 15, 2008, 10:16:51 AM »
  • Best Answer
  • Still getting nowhere fast with this.  Must be something simple for someone who knows how, surely?!  ???

    Offline René

    • Administrator
    • Hero Member
    • *****
    • Posts: 1832
    • Karma: 62
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #11 on: July 16, 2008, 04:32:04 PM »
  • Best Answer
  • Hi Adam,

    I'm not Java programmer but have some background in Java and C#. Based on quick check of your code I would say the issue is related to using Collection object. That class doesn't support sorting and I haven't found a way how to add sorting to it. The easier solution would be using other class from Java Collections Framework like ArrayList or LinkedList. These can be sorted using the function "sort" from java.util.Collections.

    Positioning each entry in predefined position is possible as well but the question is where to store the information about entry's position. You can put the information into description of a Business Attribute but it means you can use it as a description or you have to implement some parsing to retrieve position from the description (example "This is description (1)" - you have to parse the value between parenthesis).

    Hope it helps you
    R.

    Offline Adam_W

    • Full Member
    • ***
    • Posts: 171
    • Karma: 0
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #12 on: July 17, 2008, 03:09:19 PM »
  • Best Answer
  • Yes someone else mentioned using a LinkedList class instead.  Unfortunately I'm not that well-versed in Java/Javascript so I'm not sure how to implement this.

    Looks like I need to go on a Java training course!  :)

    Offline René

    • Administrator
    • Hero Member
    • *****
    • Posts: 1832
    • Karma: 62
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #13 on: July 20, 2008, 09:34:54 AM »
  • Best Answer
  • Hi Adam,

    I have small present for you ;)

    Attached to this post you'll find two JSP files. The first one (simple) is modified version of your original JSP that supports alphasorting. It uses LinkedList class that contains EnumValue objects.

    The second version (enhanced) is more complex and supports either alphasorting or sorting by position. It uses LinkedList class that contains objects based on custom class EnumValueEnh. Item's position is retrieved from description of Business Value. Take it as an example and customize it in the way you prefer.

    Hope it helps you
    R.
    « Last Edit: July 20, 2008, 09:36:51 AM by René »

    Offline Adam_W

    • Full Member
    • ***
    • Posts: 171
    • Karma: 0
    Re: Custom tab in GAD - Sort options alphabetically?
    « Reply #14 on: July 21, 2008, 10:51:44 AM »
  • Best Answer
  • Brilliant, works perfectly!

    Thanks René, so good to finally finish that job!  ;D