Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6716 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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 !

Posted

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

This topic is 6716 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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