Sort on Characteristic with numbers

Hi,
I wish to sort on a characteristic in BEx when the field is a number, in numerical order, and when a character, in character order.  EG., for Size we could have shoe sizes and shirt sizes respectively; 1, 1.5, 2, 2.5...10, 10.5, etc. and S, M, L, XL etc.  Sort comes back this way;
1
10
10.5
1.5
2
2.5
L
M
S
XL
Values above are both Key and Text.  I realize I cannot get the S, M, L, XL lined up correctly, but what about the number value?  Is there a function I could use for this?
Kind Regards,
Alex

Hi Alex,
One way to command this could be to create an attr for Size and put the order into that char, I mean the attr. Then in the query designer, in the Size properties, set the sorting according to this attr.
So you can have
SIZE____ATTR
1_______1
1.5_______2
2_________3
and so on.
Hope this helps...

Similar Messages

  • How to sort a list with numbers?

    Hi!
    How do i sort a list like this:
    ["Amningsnapp 6.c", "Anti-Colic Nappflaska 6.b", "Barn/Baby Underjams Girls 5.b", "Hår Gummisnodd 1.c", "Leksaker 7.a", "Pincett 2.a", "Protes Rengöring 3.a", "Sprayflaska Plast 4.b"]
    ...so that I get a list in number order like this instead:
    ["Hår Gummisnodd 1.c","Pincett 2.a","Protes Rengöring 3.a","Sprayflaska Plast 4.b","Barn/Baby Underjams Girls 5.b","Anti-Colic Nappflaska 6.b","Amningsnapp 6.c","Leksaker 7.a"]
    On mouseUp
    currentItem = the mouseLine
      if the doubleClick = TRUE then
        handlingslista.add (field(12).line[currentItem])
        sort handlingslista
        set x = count (handlingslista)
        repeat with i = 1 to x
          put handlingslista[i] into member(17).line[i]
        end repeat
      end if
    end
    --This is what the list handlingslista contains:
    ["Amningsnapp 6.b", "Anti-Colic Nappflaska 6.b", "Barn/Baby Underjams Girls 5.b", "Hår Gummisnodd 1.c", "Leksaker 7.a", "Pincett 2.a", "Protes Rengöring 3.a", "Sprayflaska Plast 4.b"]

    Assuming the number always occurs as the last word, you could temporarily store the items in the form ["6.c", "Hår Gummisnodd 1.c"], therefore resulting them being sorted lexicographically based on the last word, like this:
    handlingslista = ["Amningsnapp 6.c", "Anti-Colic Nappflaska 6.b", "Barn/Baby Underjams Girls 5.b", "Hår Gummisnodd 1.c", "Leksaker 7.a", "Pincett 2.a", "Protes Rengöring 3.a", "Sprayflaska Plast 4.b"]
    repeat with n = handlingslista.count down to 1
      handlingslista[n] = [the last word of handlingslista[n], handlingslista[n]]
    end repeat
    handlingslista.sort()
    repeat with n = handlingslista.count down to 1
      handlingslista[n] = handlingslista[n][2]
    end repeat
    put handlingslista
    -- ["Hår Gummisnodd 1.c", "Pincett 2.a", "Protes Rengöring 3.a", "Sprayflaska Plast 4.b", "Barn/Baby Underjams Girls 5.b", "Anti-Colic Nappflaska 6.b", "Amningsnapp 6.c", "Leksaker 7.a"]
    Alternatively, you could use Javascript, in which Arrays can be sorted based on an arbitrary ordering: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/sort.

  • Problem Sorting on Artist Name with numbers in title

    I just upgraded to iTunes 7.7 and when I sort by artist, all the artists with numbers in their name (3 doors down, 10,000 Maniacs) appear after the "Z's" at the very end of my library, I want them before the "A's" as the first block of songs in my library, can't firgure out how to do that, it was always that way in my previous iTune versions, but with the upgrade it changed by itself
    Can anyone help, I am sure this should be easy as I never had to do anything before to get this sorting behavior

    This was changed in version 7.3.
    See this -> iTunes 7.3: Changes in music sort order

  • How can i sort PDF's on IBook with the name that starting with numbers

    i import a number of pdf's representing ameeting agenda as the files names (1xxx,1.1xxxx, 2.xxxx,10.xxxx) on ibook , however the files sorted on a diffrent way as file start with 10 on first . so how can i sor the files on the IBook  with its name starting with numbers as1 &1.1 and so on.

    You seem to want a numeric sort but are getting a character sort.
    a number range  would be 0,1,2,3, ... 9,10,11 ...
    sorting like everything else with computers is an algorithm.  Someone needs to define how it works.  When you see a list of files, someone has defined how the list will be sorted. If you compare Windows file sorting to Mac files sorting you will find there are differences.
    In the case of files sorting, the files are sorted on characters from left to right. In file sorting the sorting algorithm does not try to determine that files are numbers.  All files beginning with a 1 will be sorted together becuase the file sorting althorithm doesn't look at the second character position before grouping all the 1's together.
    For what it is worth, there are multple books written on sorting.
    Robert

  • Sort artists with numbers as their names first

    Not to long ago, iTunes used to sort artists that had numbers in their names (311, 2pac, 50 cent)
    first on the list, which i loved because numbers should always come before letters, but in the recent updates with itunes, numbers are now last after the Z's
    Can someone give me a solution for this? a registry key or something maybe?

    I did a litle cheat. I have some artists that I WANT to list at the top and before I did the
    1. [artist name]
    2. [artist2 name]
    But since they decided to list these at the bottom (stupid decision), I mass updated the info on each artist to start with a.1, a.2, a.3, etc. This now lists the artists at the top in the order I want them in. A very nice easy workaround. No telling what Apple will do down the road, it's obvious they think #'s should be after letters. Contrarian company, I swear.
    Message was edited by: Jerry Ferguson1

  • Sorting an array of numbers with loops

    Hi, i'm looking for a way to sort an array or numbers with loops.
    my array looks like this. int[] numbers = {5,2,7,9,1}
    i know how to use the "sort" method and i want to do it without the sort method, but i am not very clear on the logic behind it.
    by the end it should look like this, {1,2,5,7,9}
    i know 2 loops are used, can you please give me a logic to work with.
    i have started the loops but what to do inside???
    int temp;
    for (int i=0; i<numbers.length; i++){
    for (int j=1; j<numbers; j++){
    if (numbers<numbers[j])
    temp = numbers[i];
    Any suggestions i will be thankful for.
    thank you.

    fly wrote:
    no not really a homework question.. i want to improve my logic because it is very poor at the moment.. but i'm sure someone knows how to sort an array with loops only.Yes, we do know how to do it, I once wrote a heapsort in assembly code, as a real work project. But you rarely get a project like that the good ones were all done years ago.
    All the algorithms I suggested you look at use loops. the simplest and slowest is the bubble sort. This one runs by comparing values and swapping their locations, the wikipedia article http://en.wikipedia.org/wiki/Bubble_sort has the algorithm.

  • Help Sorting array of strings with numbers in them

    Hello I need to sort an array of Strings of numbers. The order is not what I want it to be. instead of 1, 5, 20 it will go 1, 20, 5.
    I did a google search for this and found some code that could fix this. The only problem is I tried using it as a method in my program and am getting a compile-time error that I'm not sure how to fix.
    C:\Documents and Settings\Owner\Desktop\stringcompare.java:18: '(' or '[' expected
                new Comparator<String>()
                                    ^I'm not sure what to do here. Any help would appreciated.

    import java.io.*;
    class MyProgram{
    //This is my old bubble sort method which screws up with numbers
    public static String[] sort( String[] points)
              boolean keepGoing = true;
              while(keepGoing == true){
                   keepGoing = false;
                   for(int i = 0; i < points.length - 1; i ++)
                        if(points.compareToIgnoreCase(points[i + 1]) < 0)
                             String temp = points[i];
                             points[i] = points[i + 1];
                             points[i + 1] = temp;
                             keepGoing = true;
              return points;
    //This method reads a pre-existing text file
    public static String[] readPoints() throws IOException
              FileReader file = new FileReader("points.txt");     
              BufferedReader in = new BufferedReader(file);
              String temp;                
              String[] list = new String[100];     
              int i = 0;
              while (i < list.length)                    
                   temp = in.readLine();
                   if (temp != null)
                        list[i] = temp;                    
                   else
                        list[i] = " ";
                   i++;
              in.close();                              
              return list;
    //rewrites file after being sorted
         public static void savePoints(String[] points) throws IOException
              FileWriter file = new FileWriter("points.txt");
              BufferedWriter out = new BufferedWriter(file);
              int i = 0;
              while (i < points.length)          // while the end of file is not reached
                   out.write(points[i]) ;
                   out.newLine();
                   i++;
              out.flush();
              out.close();
    public static void main(String[]args) throws Exception{
    String[]points = new String [100];
    points = readPoints();
    points = sort(points);
    savePoints(points);
    for(int i = 0; i < points.length - 1; i++)
    System.out.println(points[i]);
    The problem is that it doesn't sort as I would like it and I'm not sure how to get the comparator to work properly.
    Edited by: myol on May 31, 2008 4:21 PM
    Edited by: myol on May 31, 2008 4:23 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How Do I Get Spell Checker to Flag Words with Numbers?

    Hi,
    I cannot find any articles on this, so sorry if it's already been answered elsewhere.
    I sometimes accidentally hit a number key when typing words like "you"--so that it becomes "y9ou". The Firefox built-in spell checker does not flag this as a misspelling.
    In other programs there is a check box to allow this or not, but I cannot find one for Firefox. I do not use words with numbers very often, except something like W2, so I would prefer those get flagged instead of ones that are wrong like y9ou or w3ere that I make frequently.
    Any help on this?
    Thanks!
    Don :)

    Hi, Again,
    Thanks for the info. And for a quick reply. ;-)
    I checked my current cop0y of LibreOffice (I replaced OpenOffice.org with it several months ago). LibreOffice uses Hunspell as well. I had not checked the boxes to check words with numbers or all-caps as I had previously done in OpenOffice.org, so for all this time I have been thinking it would flag errors in those when it wasn't. Must have made LOTS of mistakes I didn't catch in that time. ;-(
    In LibreOffice, go to Tools => Options => Languages => Writing Aids. You can choose to enable spelling and grammar checking (not sure what the grammar checker oes, since it was already enabled but I have never seen any evidence of it). The below that is a section of checkboxes where you can specify what is and is not flagged by the spell checker. I checked the words with numbers and capital letters choices. So now it will catch all the acronyms I haven't added to the spell checker dictionary.
    I was looking for the same sort of choice in Firefox but didn't see it. Perhaps there is an API in Hnnspell the Firefox developers can use to add this choice as a checkbox, the way it is in LibreOffice.
    I realize this may be perceived as a low priority, but I would certainly appreciate seeing it in a future update of Firefox. At least making this post helped me get the settings i wanted in my word processor.
    Take care and God bless.
    Don :)

  • How can I set check spelling to catch words with numbers in them?

    I sometimes inadvertently type a number in the middle of a word, e.g., "typ9o," but the spell-check feature never catches them. Can I change a setting to get spell-check to catch these kinds of words?

    Hi, Again,
    Thanks for the info. And for a quick reply. ;-)
    I checked my current cop0y of LibreOffice (I replaced OpenOffice.org with it several months ago). LibreOffice uses Hunspell as well. I had not checked the boxes to check words with numbers or all-caps as I had previously done in OpenOffice.org, so for all this time I have been thinking it would flag errors in those when it wasn't. Must have made LOTS of mistakes I didn't catch in that time. ;-(
    In LibreOffice, go to Tools => Options => Languages => Writing Aids. You can choose to enable spelling and grammar checking (not sure what the grammar checker oes, since it was already enabled but I have never seen any evidence of it). The below that is a section of checkboxes where you can specify what is and is not flagged by the spell checker. I checked the words with numbers and capital letters choices. So now it will catch all the acronyms I haven't added to the spell checker dictionary.
    I was looking for the same sort of choice in Firefox but didn't see it. Perhaps there is an API in Hnnspell the Firefox developers can use to add this choice as a checkbox, the way it is in LibreOffice.
    I realize this may be perceived as a low priority, but I would certainly appreciate seeing it in a future update of Firefox. At least making this post helped me get the settings i wanted in my word processor.
    Take care and God bless.
    Don :)

  • Sorting Multiple columns in Numbers

    I have imported an excel sheet into a numbers sheet.  In excel I can ask date to sort by two columns - for instance (i work for a law practice) sort by court and last name.  Can you do this in Numbers?  In Excel each column has up/down arrow icons so that is it easy to sort without going to the menu.  Is this possible with numbers?  I want to verify that we can shift to Numbers before updating to Lion.  Sandy

    Here are some images to highlighy how to use the Reorganize Panel Jerry was describing:
    clink in the table you want to sort (reorganize) and click the "Reoganize" button in the tool bar OR select the menu item "Table > Show Reorganize Panel"

  • Lightroom Version 1 Folders No Longer Sort According To Natural Numbering

    What gives? In Lightroom Beta 4 on the Mac I was able to sort my folders by natural numbers - i.e. Film 1, Film 2, Film 3. Now Version 1 sorts the folders on a binary basis i.e. Film 1, Film 10, Film 100, Film 101. Anyone else having this problem with numbered folders?

    I was noticing the same thing. Beta folders are being display the complete file path. New folders are only showing the sub-folder name and aren't sequential. I end up with a number of Raw01, Rwa02, Raw03... folders without any discrenable order. I would have hoped that all the folders would be listed together instead of Raw01, Raw01, Raw01, Raw02, Raw02, Raw02...

  • Table Sorter for String displaying Numbers

    Hi All.
    I have a table whose one of the columns display numbers with data type string. This is becuase :
    1. RFC gives me as String.
    2. I have to display blank in case no value or zero is present (since int, long etc default to Zero, hence  
        not used).
    I have to sort this column as a number.Since the datatype is string, it sorts the numbers as string
    for example : if we have  values like : 2, 4, 3, 10, 19, 15, 20, 22
    currently as String it sorts as follows : 10, 15, 19, 2, 20, 22, 3, 4.
    but i want as follows : 2, 3, 4, 10, 15, 19, 20, 22.
    Useful answers will appreciated.
    Thanks and regards,
    Aditya Deshpande.

    In order to sort the node with attribute of type string; please use the following code..
    Here use the node where you store the string value..
    wdContext.nodeTest().sortElements(
                new Comparator() {
                   public int compare(Object o1, Object o2) {
                        // TODO Auto-generated method stub
                   IPrivateExperimentView.ITestElement ele1 = (IPrivateExperimentView.ITestElement)o1;
                   IPrivateExperimentView.ITestElement ele2 = (IPrivateExperimentView.ITestElement)o2;
                        return Integer.parseInt( ele1.getNumStr()) > Integer.parseInt( ele2.getNumStr()) ? 1 : -1;
    input :  "2", "4", "3", "10", "19", "15", "20", "22"
    result : "2", "3", "4", "10", "15", "19", "20", "22"
    vinod

  • IPod 4,1 will not update to iOS 7. I updated my iMac to 10.9.1 (maverick). Latest Numbers version on iMac is not compatible with Numbers on iPod. Ideas? Can I go back a version with Numbers?

    iPod 4,1 will not update to iOS 7. I updated my iMac to 10.9.1 (maverick). Latest Numbers version on iMac is not compatible with Numbers on iPod. Ideas? Can I go back a version with Numbers? I downloaded old version of Numbers 2.0.1 from DVD but with both versions the 2.0.1 will not open.  So both versions are present but only the new version functions. I tried to drag the new version to the trash but the old version still runs error message and will not open. I did not try to restart with the new version in the trash.

    Maybe. See:
    Reverting to previous version of Numbers

  • Excel file with numbers on ipad.

    I sent an excel file with numbers to my ipad.  When I open it with Numbers there is no data in the cells.  HELP!!

    How did you send it? Email? iTunes?

  • Automatically open excel spreadsheets with numbers

    can anyone tell me is it possible to set numbers as the default application to ALWAYS open excel spreadsheets? each time i try to open an excel spreadsheet the computer starts up the trial office software. I then have to cancel and choose "open with" and then set "always open with" numbers.
    Having just converted from Windows, I was able to set certain programs to always handle specific file formats, e.g. .jpg, mpeg, avi so I did not have to choose the program every single time i wanted to open a file.
    thx., same goes for pages ,in lieu of word?

    Select an Excel file and option-select (Right Mouse Button) and select Get "Info". See attachment below to set "Open With."
    Regards,

Maybe you are looking for

  • Installation problem with CS4 on Windows 7

    I have been trying to install CS4 to a new HDD. It is from the (licensed) disk. It stops at the Initializing phase: "Checking System Profile", getting stuck at 90%. Here is the screen message: I have turned off any antivirus scanning, even turned off

  • How can i see the size of the songs listed in iTunes?

    Is there any option to see the size of the songs and albums I have imported to iTunes? I think thats really basic information, but I'm not able to find it...

  • Requirement part-2

    The processing sales orders within SAP ECC, the document creation triggers order fulfilment processes.  The fulfilment processes can be grouped in three main areas (delivery, shipment and billing).  The customer may place inquiries to obtain status o

  • MAC OS X LEOPARD/Bootcamp/Windows Vista

    Hello all, Just was wondering some things about the title up there. In Leopard, will we be able to install another OS like vista via bootcamp without the full version of it (in other words with an upgrade version)? Something else I'd like to ask is w

  • Reports & activity opening an excel file

    Hello, We are running ACS v3.3 on a windows 2003 env. when we try to open a csv file, it opens in the browser, I want it to open in a seperate Excelfile. In our v3.0, it worked that way, what do we need to change so it open once again in an Excel she