Sorting Alpha-Numeric String Fields Numerically?

%3CLINGO-SUB%20id%3D%22lingo-sub-1320164%22%20slang%3D%22en-US%22%3ESorting%20Alpha-Numeric%20String%20Fields%20Numerically%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1320164%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EIn%20Sharepoint%20my%20file%20names%20are%20string%20types%20that%20contain%20both%20letters%20and%20numbers.%20How%20do%20I%20get%20the%20files%20to%20sort%20numerically%20(i.e.%201%2C%205%2C%2013%2C%2020)%20as%20opposed%20to%20sorting%20it%20like%20text%20(i.e.%201%2C%2013%2C%2020%2C%205)%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%20many%20many%20files.%20I'm%20aware%20that%20keeping%20all%20numbers%20the%20same%20length%20avoids%20this%20issue%20(i.e.%20001%2C%20005%2C%20013%2C%20020)%20but%20would%20like%20to%20avoid%20going%20back%20and%20changing%20these%20one%20by%20one.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20some%20sort%20of%20JSON%20code%20you%20can%20write%20in%20the%20custom%20formatting%20section%3F%20Any%20help%20is%20appreciated.%20I%20am%20completely%20unfamiliar%20with%20JSON.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1320164%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

Hi,

In Sharepoint my file names are string types that contain both letters and numbers. How do I get the files to sort numerically (i.e. 1, 5, 13, 20) as opposed to sorting it like text (i.e. 1, 13, 20, 5)?

 

There are many many files. I'm aware that keeping all numbers the same length avoids this issue (i.e. 001, 005, 013, 020) but would like to avoid going back and changing these one by one.

 

Is there some sort of JSON code you can write in the custom formatting section? Any help is appreciated. I am completely unfamiliar with JSON.

0 Replies