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

Featured Replies

I need to parse numbers in separate fields.

Base is a text field with data:

124.23F or

12.34G or

123.4H or

1.23K.

There will be always one letter, no problem to parse that part.

For the number left of the period I use:

Left ( myField; Position ( myField; "."; 1; 1) - 1)

Works well.

If I follow the same logic (well, my logic), for the part right of the period I could use:

GetAsNumber ( Right ( myField; Position ( myField; "."; 1; 1) - 1))

GetAsNumber because the result of the parsing has to be number and I don't want the possible letters.

I just got 1 number as result.

When I change the -1 to +1, the result takes sometimes 1 character from the left side of the (.) period.

What am I doing wrong and why?.

The why is important to understand the needed logic.

Just to go more on my own.

Tia

Edited by Guest

why not use Filter (YourField; "0123456789.")

Lee

  • Author

That will remove the (.) and the letter.

I need what's at the left side of the period in one field, what's right of the period in an other field and the letter in a third field.

I missed read your need.

How about:

Left side

Left ( text ; Position ( text ; "." ; 1 ; 1 ) - 1 )

Right Side

Filter ( Right ( text ; Length ( text ) - Position ( text ; "." ; 1 ; 1 )) ; "0123456789")

And for the letter

Filter (Text; ""ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz., ")

Lee

  • Author

Thanks Lee, it works.

I only had to remove the (.) and the (,) from your Text formula.

Although I see how it works, I want to understand why my approach didn't work.

Care to shed some light ?

Hmmm if there are no spaces we can use possibly.

GetAsNumber ( LeftWords ( Substitute ( myField; "."; " " ); 1 ) )

GetAsNumber ( RightWords ( Substitute ( myField; "."; " " ); 1 ) )

  • Author

Maybe yes, but that would remove a posible leading zero in the right part.

And that possible zero is still needed in the parsed part.

Then try:

Filter ( LeftWords ( Substitute ( myField; "."; " " ); 1 ) ); "0123456789" )

Filter ( RightWords ( Substitute ( myField; "."; " " ); 1 ) ); "0123456789" )

Both of your calculations have an extra ")" in them.

Filter ( LeftWords ( Substitute ( myField; "."; " " ); 1 ) [color:red]); "0123456789" )

Filter( RightWords ( Substitute ( myField; "."; " " ); 1 ) [color:red]); "0123456789" )

Lee

Oops. Thats what I get for copying and pasting. Thanks for the catch Lee. ???

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.