Brian Dunning's FileMaker Custom Functions

OriginalToNatural ( value ; cont )

Converts values to "natural" values

  Average rating: 5.0 (1 vote) Log in to vote

Ángel Martínez Fernández   Ángel Martínez Fernández - Show more from this author
Lesterius Barcelona
https://www.lesterius.es/

Share on Facebook Share on Twitter

  Sample input:
OriginalToNatural ( "abc123¶zyx1" ; 1 )
  Sample output:
abc0000000123
zyx0000000001

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Natural sort order is an ordering of strings in alphabetical order, except that multi-digit numbers are ordered as a single character. Natural sort order has been promoted as being more human-friendly ("natural") than the machine-oriented pure alphabetical order.

For example, in alphabetical sorting "z11" would be sorted before "z2" because "1" is sorted as smaller than "2", while in natural sorting "z2" is sorted before "z11" because "2" is sorted as smaller than "11".

That's why I called it "natural" values

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: