3 Replies Latest reply on Apr 29, 2014 12:51 PM by philmodjunk

    sorting

    smithsmith

      Title

      sorting

      Post

           hi guys!

           in my db i have a field (text or number i dont know the correct) which takes something like this..2-3..or 5-6 (that mean range of numbers).when i need to sort that filed i have a problem. what can i do??

        • 1. Re: sorting
          philmodjunk

               if your field is actually storing the characters 2-3, this will need to be a text field. If you need to sort your records using this field, that will be a problem. You may need to define a calculation field that returns number with something such as:

               Getvalue ( Substitute ( "2-3" ; "-" ; ¶ ) ; 1 )

               This gives you a field where, if you specify it in your sort order, sorts on the value to the left of the "-" character.

          • 2. Re: sorting
            smithsmith

                 otherwise how could i store this information?

            • 3. Re: sorting
              philmodjunk

                   You could store it as two number fields, one for the minimum value and one for the maximum value. That gives you two number fields, but you can still display the data in your 2-5 format using merge fields or a calculation field that combines the values with the hyphen.