Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi Everyone. Soon be Saturday!!!

Any ideas on how I can amend the below script such that if the output is 0.0 then it states "text of my choice"

Alternatively

Some other separate sciprt that I can add that with tell a field to state "something" when the field calcuation = 0.

Thanks all

Let([

start = Cosmet2010::Margin of Safety Baby [zz__kf__Cosmet2009RepNum] ;

integer = Int ( start ) ;

decimal = start - integer ;

decimal1 = Substitute ( decimal ; "." ; "") ;

decimal2 = Left ( decimal1 & "0" ; 1 ) ;

result = "MoS - Baby 5.9kg: " & integer & "." & decimal2

];

result

)

Posted

Case( start + 0 = 0 ; "something" ; result )

The "+0" is to handle if the field is empty. Slightly simpler than:

Case( IsEmpty( start ) or start = 0 ; "something" ; result )

  • 2 weeks later...
Posted

Use the calculation I supplied in place of the final "result".

This topic is 4917 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.