September 4, 200619 yr 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
September 4, 200619 yr 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 !
September 4, 200619 yr 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
Create an account or sign in to comment