CA Service Management

  • 1.  Numeric Ascending Order on a Dropdown field

    Posted Dec 22, 2017 10:03 AM

    Hello All,

     

    I came with a scenario where my dropdown having following values (4, 8, 12, 16, 32, 64, 96, 128 ), coming from a property value. Now as per default process the dropdown data appears in a alphabetical order, hence I see 12 and 128 are appearing as the first two values of the list. Whereas I want to display it in ascending order. How can I achieve this?

     

    Thanks

    ArunavaS

     



  • 2.  Re: Numeric Ascending Order on a Dropdown field

    Broadcom Employee
    Posted Dec 22, 2017 10:12 AM

    Hello,


    Can you confirm if these are properties defined in Service Desk or Service Catalog?  


    If this is Service Desk, please confirm also if you are using Properties functionality on the tickets or if you created a custom field displaying the given integer values.  If relevant, please share the custom form for examination here.



  • 3.  Re: Numeric Ascending Order on a Dropdown field

    Posted Dec 22, 2017 10:15 AM

    hello David,

     

    The properties are defined on ServiceDesk category. We convert each ServiceDesk category as Service Catalog form.  Yes we use the properties functionality on the tickets.



  • 4.  Re: Numeric Ascending Order on a Dropdown field

    Broadcom Employee
    Posted Dec 22, 2017 10:15 AM

    Arunava. property values are string values so convert them to numeric order would need a lot of customization. You may consider a quick "workaround" by giving the values like 1. 4 GB, 2. 8GB, 3. 16GB,..., 8. 128 GB so this way not only sort the way you like but also more readable. My 2cents. Thanks _Chi



  • 5.  Re: Numeric Ascending Order on a Dropdown field
    Best Answer

    Broadcom Employee
    Posted Dec 22, 2017 10:19 AM

    Another might be to spell out the complete integer value, ie 004 GB, 008 GB, 016 GB, 128 GB to trick the strings to sort in string order.



  • 6.  Re: Numeric Ascending Order on a Dropdown field

    Posted Dec 22, 2017 10:25 AM

    better than before.



  • 7.  Re: Numeric Ascending Order on a Dropdown field

    Posted Dec 22, 2017 10:23 AM

    Hey Chi,

    I agree that's a way off-course. However I was expecting if we can impose a java-script sorting program onclick event, just for this scenario. Obviously I will not prefer to do an entire customization just for a form field view.

     

    Thanks

    ArunavaS



  • 8.  Re: Numeric Ascending Order on a Dropdown field

    Posted Dec 22, 2017 02:20 PM

    Hi,

     

    Assuming this is a data object you configured to pull the property values. I think you can alter your sql statement to have it sort the way you want.

     

    Check this article, it describes converting a varchar to int and sorting the results.

    http://sqlserverplanet.com/tsql/how-to-order-numeric-values-in-a-varchar-field 



  • 9.  Re: Numeric Ascending Order on a Dropdown field

    Broadcom Employee
    Posted Jan 02, 2018 03:28 PM

    Hello Arunava,

     

    Can you confirm for us where things are with this post?  Did any of our suggestions work out for you on this one?  If so, could you mark the question as "Correct" please?