dreimer Posted January 22, 2013 Share Posted January 22, 2013 I know Fusion Pro has a built in rule to add leading zeros, but is there an easy javascript rule I could use to remove leading zeros? TIA Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 22, 2013 Share Posted January 22, 2013 If it's a number, you can just use the Number function, like so: return Number(Field("YourFieldName")); Or you could call StringToNumber, or Int if it's an integer value. You could also do this: return Field("YourFieldName").replace(/^0+/, ''); Quote Link to comment Share on other sites More sharing options...
dreimer Posted January 22, 2013 Author Share Posted January 22, 2013 Perfect, thank you for the quick response. 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.
Note: Your post will require moderator approval before it will be visible.