stevebull Posted May 26, 2011 Posted May 26, 2011 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 )
Fitch Posted May 26, 2011 Posted May 26, 2011 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 )
stevebull Posted June 8, 2011 Author Posted June 8, 2011 Thanks but how do I add this new text into what I already have. Sorry I am an basic user.
Fitch Posted June 8, 2011 Posted June 8, 2011 Use the calculation I supplied in place of the final "result".
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now