Jump to content

Replace Contents changed in 7?

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

Recommended Posts

There is a difference between versions I noticed ... In vs. 6, I used Set Field [NumberField, NumberField] to strip leading zeros and alpha. Replace Contents worked the same whether from menu or script.

In 7, Set Field (setting a num field to itself) strips leading zeros and text) but Replace Contents (both from menu and script) does not!? I wonder why that was changed. Mind you, I'm not complaining ... just want to understand so I can take full advantage of the differences. I thought I recalled another change about Replace Contents but now can't find it. I don't think it was this issue, however.

I have been playing with the new Filter() function and applying it to number fields and calculations. Yes, I know it's a text function but I couldn't help myself. I can strip text but preserve leading zeros easily (in calculations, auto-enter or script) with:

Filter(text; "0123456789") ... sooooo much easier than in prior versions. In fact, when using Filter() on number field, you don't even need the ". But if you want to include ANY zeros, it must be listed at the end as:

Filter(text; 1234567890) ... which will also preserve the leading zeros. If you try it with the zero first, the calculation will remove the zero again after you exit the calculation box.

Of course Abs() and Int() will also strip text but it removes the leading zeros as does TextToNum. crazy.gif Filter is incredible!!!

Link to comment
Share on other sites

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