1 Reply Latest reply on Nov 3, 2011 12:34 PM by philmodjunk

    portal sorting based on numbers

    catinthehat

      Title

      portal sorting based on numbers

      Post

      Hey Ya'll

       

      I have a portal that i want to sort by number (ascending) and for some reason it looks like this

      1

      12

      2

      3

      it thinks that 12, because it begins with a 1, comes before 2. I am sure there is a simple answer to this.

      Also, that same field is text because some of the values are a, b, c.

      Any help would be much appreciated.

       

      rock on

        • 1. Re: portal sorting based on numbers
          philmodjunk

          For numbers to sort correctly, they must either all have the same number of digits or be entered in a number field.

          01, 02, 03 and 12 will sort correctly in a text field.

          Since you also have text in this field, you may need to create a hidden text field that adds the needed leading zeroes and then you set your portal to sort on this field instead of the visible field.

          Right ( "000" & TextField ; 4 )

          will make all entries 4 characters long, padded as needed with from zero to three leading zeroes.