How To: Sort Numbers in Ascending Order in a Generated List

Greetings! How do I set up a Generated List of Paragraphs so that it sorts in true ascending order? What I want is:
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
I have tried every trick I can think of with the sort order listed on the reference page. But all I can get is something that sorts by individual number (ignoring the numeric value) like:
1.1
1.10
1.11
1.2
1.20
1.21
1.3
Any help is much appreciated!

Hello there, Michael! Thanks so much for looking at my post! Alas, the LOP will not work. I should have explained more, but it was so complicated I thought folks would give up reading.
Here's the best I can render it without getting permission to share a good example document. I do not blame anyone if it's too cumbersome or convoluted to wade through...
This is a requirements document which has sort of a "legal" tinge to it--as the document evolves we must maintain traceability for individual requirements. This means, for example:
Version 1 - I have requirements 1 and 2.
Version 2 - I need to add a new requirement, which should appear before requirement 1 in the document. Even though it comes before requirement 1 in the document, numerically it will be requirement 3 and requirement 1 will remain requirement 1.
Version 3 - I need to remove requirement 2. Even though I now have only 2 requirements, their numbers will not change (they remain requirements 1 and 3, appearing in reverse order).
Version 4 - I need to move requirement 3 to be after requirement 1. Again, the requirements keep their original number, even though their position has changed and there is no longer a "requirement 2" number in use.
Originally, I told the team (I'm doing this for a different dept), that they would have to hand-number requirements, which they did for a while. But that was getting very cumbersome, and the scenarios above are limited to one or two occurrences per document. So I created an auto-number sequence for them to use in the initial version and added a little smoke-and-mirrors work process to take care of changes in later versions. The last bit of chicanery I cannot get to work is the index...
Even if there are no changes to the requirements after the initial version, the index still does not sort in ascending numeric order. It was working with the hand-numbered requirements because they were using leading zeros. But without being able to include leading zeros in the auto-numbering formats (I tried the "use a zero as a tab leader" solution and like to have thrown my new monitor out of the window), I cannot find a solution.
Or rather, I think the solution is "you have to hand-number requirements".
For anyone who has made it this far, I truly appreciate your time and patience!
SFT

Similar Messages

  • What do i use to order numbers in ascending order???

    anybody? i need to set 6 numbers into ascending order.

    java.util.Arrays.sort()
    java.util.Collections.sort()
    The Java� Tutorial - Object Ordering
    Making Java Objects Comparable
    ~

  • How to sort data in descending order when user clicks on the column heading

    Hi
    I have a report called "Top customers", which shows the top customers for a specific product line. It displays the customer name and one column with the total amount spent in the period for each product line. By default, the leftmost product line is sorted in descending order.
    If the user wants to know who are the top customers for another product line, they simply click on the column heading to sort the list by that column.
    The problem is that when you click for the first time on a sortable column heading, Apex sorts it in ascending order; you need to click on the same column heading again to sort in descending order.
    Is it possible to change this behaviour and sort the data in descending order in the first click? So the users don't have to click twice...
    Thanks
    Luis
    PS: Apex 3 running on Oracle 10.2.0

    Luis,
    See: Can I "catch" a click on a sortable column header of a report?
    Take a look at Anton Nielsen's answer with regards to hiding a column and displaying its value instead of the sortable column.
    Asumming the following simple report query:
    select product,sales
    from <table>
    Change that into:
    select product
    ,sales*-1 as reverse_sales -- Select this one as an extra column
    ,sales -- Hide this column
    from <table>
    In your report column attributes (of column reverse_sales), html-expression, type #sales#. It then displays the normal sales. However apex will generate a 'order by 2 asc' for the first time. The '2' will refer to the sales*-1 value: sorting it asc, is the same as sorting sales descending...
    Toon

  • Doesn't Sort data in Ascending order in Hash Table?

    Hello
    I am using JSP, Servlets. After quering in servlets, putting data in HashTable then set attribute in servlets, get attribute in JSP & retrieving data from HashTable in JSP & putting in select html element, data is not coming in ascending order in select drop down box. I need A,B,C,D but it is coming b,d,c,a. When I run query in DB, it shows in sequence but after putting in HashTable, it is not coming in sequence.
    How to make it ascending?
    Looking forward for an early reply.
    Thanks.

    Hi
    Something to do with TreeMap(TreeSet). I tried with TreeSet but it didn't work. Here is the code :
    In servlet :
    Connection lConnection = getConnection(pRequest);
    String lSQL = "";
    Statement lStatement;
    ResultSet lResultSet;
    Hashtable lLtypeHashtable = new Hashtable();
    lStatement = lConnection.createStatement();
    lSQL = "SELECT RCID,RCMEANING FROM REFERENCECODES WHERE RCDOMAIN = 'LOCATIONTYPE' AND RCROWSTATE > 0 order by RCMEANING";
    lResultSet = lStatement.executeQuery(lSQL);
    while(lResultSet.next())
    String lRcid = lResultSet.getString(1);
    String lRcmeaning = lResultSet.getString(2);
    lLtypeHashtable.put(lRcid.trim(),lRcmeaning.trim());
    if(lResultSet != null) lResultSet.close();
    if(lStatement != null) lStatement.close();
    pRequest.setAttribute("LtypeHashtable",lLtypeHashtable);
    //Below Query is executed when one data from select element is selected
    String lLType = DisplayUtilities.getString(pRequest.getParameter("LType"),true);
    //LType is name of select element in JSP.
    if (lLType != null)
    lSQL = lSQL + " AND " + lUpperCaseFunction + "(LOCATIONTYPE)" +
    " = " + DBUtilities.formatString(lLType.toUpperCase());
    pRequest.setAttribute("rLType",lLType+"");
    In JSp :
    <%
    Hashtable lLtypeHashtable = (Hashtable)request.getAttribute("LtypeHashtable");
    %>
    <TR>
    <TD width="15%"> <div align="left">
    <select name="LType" size="1" >
    <option Value="">< Select ></option>
    <%
    if(lLtypeHashtable != null)
    Enumeration enum = lLtypeHashtable.keys();
    while(enum.hasMoreElements())
    String key = (String)enum.nextElement();
    String value = (String)lLtypeHashtable.get(key);
    String flagBack = "";
    if(key.equals((String)request.getAttribute("rLType")))
    flagBack = "selected";
    %>
    <option Value="<%=key%>" <%=flagBack%>><%=value%></option>
    <%
    %>
    </select></div>
    </TD>
    </TR>
    How should I implement TreeSet?
    Looking forward for an early reply.
    Thanks.

  • Creating java program that orders 3 numbers in ascending order using if els

    Does anyone know what code to use for creating a java program that uses the if else operators to order 3 variables in ascending order?

    nar0122 wrote:
    correct on the homework assumption...you have a good nose...the thing is...i know i need to make an if statement saying if a is less than b, and a is less than c...print a first...but how do i get it to "print a" first? if a is less than c and b...and so on for b and c? sorry if that was confusing...
    int a = ..., b = ..., c = ...;
    if(a > b AND a > c) {
      print a
      if(b > c) {
        print b, print c
      } else {
        print c, print b
    etc.

  • HOW TO SORT SAFARI BOOKMARKS IN ORDER

    Hi,
    Does anyone know how to sort the Safari Bookmarks in order from A to Z so that the sub folders are in order from A to Z??? If so, please advise. Also, please advise if it is possible or not to sort bookmarks in Safari.
    Thanks,
    relaxed

    Safari doesn't sort bookmarks. You need to use a third-party solution for that:
    Safari Sorter (free).
    Mulder

  • How to sort database record in an Ascending or Descending order

    First script below is on Initialize the second on Validate.  I need the database to sort on an ascending order.  I tried using the order by script in RED below to the Validate script but to no avail.  Any help would be greatly appreciated.
    $sourceSet.DataConnection2.#command.query.select.nodes.item(0).value = Concat("Select * from brw.ps_m_ee_genl_data Where FULL_NAME = ", Ltrim(Rtrim(SelectField.rawValue)) , " order by FULL_Name asc")
    form1.#subform[0].SelectField::initialize - (JavaScript, client)
    /* This listbox object will populate two columns with data from a data connection.
    sDataConnectionName - name of the data connection to get the data from. Note the data connection will appear in the Data View.
    sColHiddenValue - this is the hidden value column of the listbox. Specify the table column name used for populating.
    sColDisplayText - this is the display text column of the listbox. Specify the table column name used for populating.
    These variables must be assigned for this script to run correctly. Replace <value> with the correct value.
    var 
    sDataConnectionName = "DataConnection2"; // example - var sDataConnectionName = "MyDataConnection";
    var 
    sColHiddenValue = "FULL_NAME"; // example - var sColHiddenValue = "MyIndexValue";
    var 
    sColDisplayText = "EMPLID"; // example - var sColDisplayText = "MyDescription"
    // Search for sourceSet node which matchs the DataConnection name
    var 
    nIndex = 0;
    while 
    (xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName){
    nIndex
    ++;}
    var 
    oDB = xfa.sourceSet.nodes.item(nIndex);oDB.open();
    oDB.first();
    // Search node with the class name "command"
    nIndex
    = 0;
    while 
    (oDB.nodes.item(nIndex).className != "command"){
    nIndex
    ++;}
    // Need to set BOF and EOF to stay
    oDB.nodes.item(nIndex).query.recordSet.setAttribute("stayBOF"
    , "bofAction");oDB.nodes.item(nIndex).query.recordSet.setAttribute("stayEOF"
    , "eofAction");
    // Search for the record node with the matching Data Connection name
    nIndex
    = 0;
    while 
    (xfa.record.nodes.item(nIndex).name != sDataConnectionName){
    nIndex
    ++;}
    var 
    oRecord = xfa.record.nodes.item(nIndex);
    // Find the value node
    var 
    oValueNode = null;
    var 
    oTextNode = null;
    for 
    (var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++){
    if(oRecord.nodes.item(nColIndex).name == sColHiddenValue){
    oValueNode
    = oRecord.nodes.item(nColIndex);}
    else if(oRecord.nodes.item(nColIndex).name == sColDisplayText){
    oTextNode
    = oRecord.nodes.item(nColIndex);}
    while 
    (!oDB.isEOF()){
    this.addItem(oValueNode.value
    , oValueNode.value); 
    //IDList.addItem(oValueNode.value, oTextNode.value);
    oDB.next();
    // Close connection
    oDB.close();
    form1.#subform[0].SelectField::validate - (FormCalc, client)
     if  (Len(Ltrim(Rtrim(SelectField.rawValue))) > 0) then
     //Change the commandType from TABLE to TEXT. TEXT is the equivalent of SQL Property
    $sourceSet.DataConnection2.#command.query.commandType= "text" 
    //Set the Select Node. Select in this case will be whatever the SQL Property you want.
    $sourceSet.DataConnection2.#command.query.select.nodes.item(0).value= Concat("Select * from brw.ps_m_ee_genl_data Where FULL_NAME = ", Ltrim(Rtrim(SelectField.rawValue)) , "") 
    //Reopen the Dataconnection
    $sourceSet.DataConnection2.open()endif

    This is in Mavericks, but I think it also applies to the Finder in Lion.
    View menu / Arrange by / Name.

  • Sharepoint 2010 under Library created folder , under this folder we have added so many folder, wants to keep them in ascending order,how to save as ascending order folder

    have created folder in library Cost , and under
    Cost created so many folder for different model, wants to keep them in ascending order,
    I found the option I can sort it as ascending order, when I close this screen than it goes back to way it was,
     is there a way to save it in ascending order all the folder screen, so when I open cost library , it stays in same order,
    2nd question :   we have approved column ,  when the person approved the cost , is there a way to keep that person the name,
    right now when the next time some other users open that file that users name comes in the approved column,
    can some one please help,
    any advise will be helpful.

    Hi Bitia,
    To create workflow in SharePoint, I recommend to use SharePoint Designer to achieve this goal.
    Firstly, we need to allow the site to be edited in SharePoint Designer, please refer to the "SharePoint Designer settings page" part in the article below:
    https://support.office.com/en-ca/article/Managing-SharePoint-Designer-2010-e12d76ce-83f7-4dde-864c-6c1e210399b6#__toc254689397
    Secondly, we can install SharePoint Designer from the site or just download and install it.
    https://kb.pachosting.hk/article/how-to-install-sharepoint-designer-to-edit-site-content-9333.html
    http://www.microsoft.com/en-us/download/details.aspx?id=16573
    After that, we can use SharePoint Designer to create workflow:
    https://support.office.com/en-ie/article/Introduction-to-designing-and-customizing-workflows-32c9c0bf-5e20-4f74-8b9c-d3ea79f2962b
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Adobe Combine Feature - Sorts numbered files incorrectly

    At my company we use a scanning software called Kofax. We also have copies of Adobe Acrobat Standard 6-9 depending on how old the work station is.
    Lets say I scan a batch of 120 pages. It will scan each page as an individual .tif file and put them all in a folder.
    The naming convention for each page is:
    1.tif
    2.tif
    3.tif
    etc
    etc
    Windows explorer sorts these numbers in correct order. If I decide to select all 120 pages I just scanned, right click, Combine into PDF, it will place the pages in the following order.
    1.tif
    10.tif
    11.tif
    12.tif
    etc etc
    100.tif
    101.tif
    etc etc
    2.tif
    20.tif
    21.tif
    etc etc
    This basically requires me to resort the entire batch in the Adobe combine screen. This is very time consuming and tedious. Is there any way to get the Adobe software to recognize the "human" numbers in ascended order? Any help with this would be GREATLY appreciated.

    This involves using a photoeditor with renaming capabilities such as ACDSee OR using the command-line (Run>cmd.exe) from the Start menu.  For the command line you would type "help for" and a help file for the "for" command would come up.  With "for" you can run an iterative loop that would cycle through your files based on certain characteristics and based on the variables you pass it you would be able to renumber your files from 1.tif to 001.tif and 10.tif to 010.tif for example.  Numbers 1-9 would be in one for loop, numbers 10-99 would be in another, and if you had to rename for files going into the thousands you would use 100-999 as another for loop, renumbering to a 0100.tif naming convention.  That is called "padding" your file names.

  • Arranging 3 integers in ascending order

    i need the code for arranging 3 numbers in ascending order. the numbers will be typed in a input dialog box. someone please help! it's homework for tomorrow dec 16 2005.

    naw, its cool. do you know any web pages where i
    might could find the code?
    e359. Sorting an Array
    It's an extremely important skill to learn how to search the web. Not only will it increase your research and development talents, it will also save you from asking questions that have already been answered numerous times before. By doing a little research before you ask a question, you'll show that you're willing to work and learn without needing to have your hand held the entire time; a quality that is seemingly rare but much appreciated by the volunteers who are willing to help you.
    If you've done the research, found nothing useful, and decide to post your question, it's a great idea to tell us that you've already searched (and what methodologies you used to do your research). That way, we don't refer you back to something you've already seen.

  • How to sort  the arry value in ascending order

    I have a string array where i need to sort the below values in ascending order in the same format...can anyone give me clue on this?
    9.3
    3.1
    9.1
    19.1
    19
    9.4
    9.1.1
    the sorted order should be
    3.1
    9.1
    9.1.1
    9.3
    9.4
    19
    19.1

    You may have easier luck writing your own comparator for this. These are headings in a table of contents, right?
    Write a comparator that tokenizes a string on the '.' character, or use a StringBuffer to remove them, and then order the elements according to the combined numbers. Since alphanumeric would order this list as you want it anyway you could just order that way once the '.' are removed.
    In other words your comparator would do this in the "compare" method:
    public class MyComparator implements Comparator, java.io.Serializable {
    private static Comparator stringComparator = java.text.Collator.getInstance();
    ...constructor(s), your own private "instance" variable of type MyComparator, a getInstance() method of your own, yadda yadda...
    public int compare(Object item1, Object item2) {
    try {
    value1 = removePeriods((String)item1);
    value2 = removePeriods((String)item2);
    if (value1 == null) {
    return (value2 == null) ? 0 : (-1);
    return compare(value1, value2);
    } catch (ClassCastException cce) {
    System.err.println("Wrong Object Type, JackAss!");
    protected int compare(String str1, String str2) {
    return MyComparator.stringComparator.compare(str1, str2);
    private String removePeriods(String value) {
    StringBuffer sb = new StringBuffer(value);
    int decimalIndex = value.indexOf('.');
    while (decimalIndex != -1) {
    sb.delete(decimalIndex, (decimalIndex + 1));
    }

  • How to sort in numbers 3.0 sort ascending is grayed out

    I tried to follow "how to sort" in numbers, but I am doing something wrong. My "sort ascending" and "sort descending" are grayed out.

    Hi Jerry,
    I suspect you have merged some cells in the table somewhere. This confuses it, as it has no way of keeping the rows containing the merge together while sorting.
    Unmerging solved it when I had the same problem.
    Best wishes.

  • Apple TV sorts my photos only in ascending order, how can I change so the most recent EVENTS appear first?

    Apple TV sorts my photos only in ascending order, how can I change so the most recent EVENTS appear first?

    I'm looking for an answer to this, too, since I have thousands of Events, and so scrolling down to the bottom every time I want to show my newest photos makes it almost unusable.

  • Sorting an array of integers into ascending order

    Today I decided to blow the cobwebs off my old laptop and see what I could remember from my Java days.
    As a task for myself to see what I could remember, I decided to try and write a program that does the following:
    - Declares an array of 4 integers
    - Sorts the array into ascending order, from lowest to highest.
    - Prints on screen the sorted array.
    After an hour or so I finally cracked it, and ended up with a working program. Here she is:
    public class Sorting_arrays_1
        public static void main()
           int [] array = {4,3,7,1};
           //A variable used to help with swopping values
           int temporary;
              //finds the smallest number out of elements 0, 1, 2, and 3 of the array, then moves it to position 0
              for (int count = 0; count<array.length;count++)
                int smallestNumber = array[0];
                if (array[count] < smallestNumber)
                    smallestNumber = array[count];
                    temporary = array[0];
                    array[0]=array[count];
                    array[count]=temporary;
             //finds the smallest number out of elements 1, 2, and 3 of the array, then moves it to position 1
             for (int count = 1; count<array.length;count++)
                int smallestNumber = array[1];
                if (array[count] < smallestNumber)
                    smallestNumber = array[count];
                    temporary = array[1];
                    array[1]=array[count];
                    array[count]=temporary;        
              //finds the smallest number out of elements 2 and 3 of the array, then moves it to position 2
              for (int count = 2; count<array.length;count++)
                int smallestNumber=array[2];
                if (array[count] < smallestNumber)
                    smallestNumber = array[count];
                    temporary = array[2];
                    array[2]=array[count];
                    array[count]=temporary;     
             //prints the array in ascending order
             for (int count=0; count<array.length;count++)
                 System.out.print(array[count] + " ");
    }Could this code be simplified though? Maybe with a for loop?
    I mean, it does the job, but it looks so clumbsy and inefficient... Imagine how much code I would need if I wanted to sort 1000 numbers..

    Use bubble sort if u want a quick fix
    public static void bubbleSort(int [] a)
    for(int i=0; i<a.length-1; i++)
         for(int j=0; j<a.length-1-i; j++)
              if(a[j]>a[j+1])
                   int temp = a[j];
                   a[j]=a[j+1];
                   a[j+1]=temp;
    Or use Merge sort if u want better run time... ie.(N log N)

  • How to display Column List (Search Bar - Do Not Display) in Ascending Order

    Hi,
    I am having a Interactive Report..
    In the Search Bar we have Select Columns, under that we have Do Not Display.
    where all the columns (currently not displayed) are listed.
    How can we display these columns in Ascending order
    Thanks,
    Deepak

    Do you want to display these columns in the IR?
    If yes. Select the column you want to display and click the the '>'.
    In the interactive report regions - source, where you have your query to select the columns use order by to sort them in assn order.
    Do you want to keep these columns as 'Do not display' and have them in assn order there?
    Select all columns to display and move the columns back to the 'Do not display' region one by one making selections in assn order.
    Or in the query select the columns in the order desired.
    I don't know if I am helping. I fell like I got your question all wrong. Still...
    Edited by: machan on Dec 11, 2009 11:01 AM

Maybe you are looking for