Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

issue sorting by field with decimals as separators

Featured Replies

  • Newbies

I am working with an inventory database where each record has a number which is formatted with a letter prefix followed by a number, sometimes sub-numbers.

example

TS.1

TS.2.1

TS.2.3

TS.10

TS.15

TS.15.1

TS.20

My issue is now sorting it as it appears above, whether I set the field type as number or text, it still sorts like this.

TS.1

TS.10

TS.15

TS.15.1

TS.20

TS.2.1

TS.2.3

Any suggestions on how I can sort them as if they were files in finder on a mac.

Thank You.

Create a new calculation field with this formula; substitute mySerialNumber with your serial number field.

Make sure result type is number. Then sort by the new field.

The formula assumes that, as in your sample data, the prefix is three characters long

and the sub-number is one digit. Adjust it for other formats.

Let (

[

theField = Replace ( mySerialNumber ; 1 ; 3 ; "" ) ;

hasPoint = PatternCount ( theField ; "." ) ;

pointPosition = Position ( theField ; "." ; 1 ; 1 )

] ;

Case (

hasPoint ;

Left ( theField ; pointPosition - 1 ) + ( Right ( theField ; 1 ) / 10 ) ;

theField

)

)

You'll have to sort by a calculation field (result is Text), e.g. =

Let ( [

words = Substitute ( OriginalField ; "." ; " " )

] ;

LeftWords ( words ; 1 ) & SerialIncrement ( "000000000" ; MiddleWords ( words ; 2 ; 1 ) ) & SerialIncrement ( "000000000" ; MiddleWords ( words ; 3 ; 1 ) )

)

The original field should be of type Text.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.