damac3000 Posted April 11, 2008 Report Share Posted April 11, 2008 I was wondering if there is a way or an option or if anyone knows of a script i can use. I want to test a particular number (decimal) to make sure it is vaild. I want to make sure that the number of decimals after you enter in a number is not more than 2 decimals places... ex XXX.xx ... I want to be able to set it up so that when it is invalid i can display an error message. The error message I got but to test to make sure that there are no more than 2 decimal places I do not. Any help would be appreciated Quote Link to comment Share on other sites More sharing options...
kevin Posted April 11, 2008 Report Share Posted April 11, 2008 Try this: Variable Set Integer %N1% from Position of Text in Variable %T1% Variable Modify String: Copy Part of %T1% to %T2% Variable Set Integer %N2% from Length of Variable %T2% If Variable %N2% > 3 Text Box Display: Error: Two many decimal digits Macro Stop Else Text Box Display: OK End If <IVAR2:01:13:1:.><TMVAR2:10:02:01:N01:9999:><IVAR2:02:12:2><IFVAR2:2:02:4:3><TBOX4:T:1:CenterCenter000278000200:000:Error: Two many decimal digitsError: Two many decimal digits><MSTOP><ELSE><TBOX4:T:1:CenterCenter000278000200:000:OKOK><ENDIF> Quote Link to comment Share on other sites More sharing options...
damac3000 Posted April 11, 2008 Author Report Share Posted April 11, 2008 Thks a lot it did work, definetly know what i need to do at this point for error handling in numbers.. thks a lot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.