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

Change a field from text to number using formula?

Featured Replies

Hello,

I have a formula that checks to see if a related field is empty, and if it is, returns a text error message. If the field is not empty, it performs a calculation and returns a number result. I would like the result to be no more than 2 decimal places long. That is easy to set if the field is designated as a number field, but then I do not get the error message. If the field is designated as a text field, everything works, but the number has too many digits on the right of the decimal point.

Does anyone know of a workaround for this?

Here is my formula, if that helps.

If(IsEmpty(InvBarcode) ; "" ;

If(IsEmpty(LiquorCatalog::FullWeight) or IsEmpty(LiquorCatalog::EmptyWeight); TextColor ( "Error" ; RGB ( 255 ; 0 ; 0 ) );

If ( CountWeight > 0 ; (CountWeight - LiquorCatalog::EmptyWeight) / (LiquorCatalog::FullWeight - LiquorCatalog::EmptyWeight) ; "")))

Thanks in advance.

Darron

Hi

TextColor() function isn't inside FM6 !

And what about a round () function ?

Like:

Case(

IsEmpty(InvBarcode) ; "" ;

IsEmpty(LiquorCatalog::FullWeight) or IsEmpty(LiquorCatalog::EmptyWeight); TextColor ( "Error" ; RGB ( 255 ; 0 ; 0 ) );

CountWeight > 0 ; round ( (CountWeight - LiquorCatalog::EmptyWeight) / (LiquorCatalog::FullWeight - LiquorCatalog::EmptyWeight) ; 2 ) ;

""

)

Note: the spaces were inserted by the site !

  • Author

Sorry, haven't updated profile since last time I was here.

I will try your suggestion and let you know if it works.

Thanks again!!

Darron

  • Author

Works perfectly!!

Thank you !

Darron

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.