Jump 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.

trimming numbers with multiple decimals in them

Featured Replies

I have a field called version. Some of the values contain multiple decimals for example

 

10.12.73.10

 

I want to trim them down to only contain 1 decimal so in other words 10.12.73.10 would become 10.12

 

another example would be 7456.342.4728.123 would become 7456.342

 

how do i do that?

 

Thanks again!

 

-Erik

Try:

Let ( 
dot2 = Position ( Version ; "." ; 1 ; 2 )
;
Case ( dot2 ; Left ( Version ; dot2 - 1 ) ; Version )
)

--

What the heck, let's have another:

 Substitute ( LeftWords ( Substitute ( Version ; "." ; ¶ ) ; 2 ) ; ¶ ; "." )

Edited by comment

This, not simpler, is another one:

Left ( version ; Max ( Position ( version & "." ; "." ; 1 ; 1 ) - 1 ; Position ( version & "." ; "." ; 1 ; 2 ) - 1 ) )

Edited by Raybaudi

 

This, not simpler, is another one:

Left ( version ; Max ( Position ( version & "." ; "." ; 1 ; 1 ) - 1 ; Position ( version ; "." ; 1 ; 2 ) - 1 ) )

 

 

You didn't test this with "123.45".

I did, but I'm missing something. Calculation edited.

  • Author

Thanks guys but I'm getting my numbers in a weird format. I didi exactly what you listed above in the first Position formula. It is making the first decimal a comma.

It is making the first decimal a comma.

 

That could happen if (1) the calculation result type is set to Number (it should be Text, of course) and (2) your file is set to use comma as the decimal separator.

Create an account or sign in to comment

Important Information

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

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.