Hi,
I have a multi select custom field, which gets value from the external db. The values are numeric. I have used 'sortOptionsByValue()' to order the options but it is not ordering them correctly.
e.g: Value 1, 2, 3, 11
are ordered: 1, 11, 2, 3.
Need any advice. Thanks in advance.
That is correct, you've chosen to use a field that works with strings, and that's the right way to order strings.
If you want it to behave as a number, you will need to change to using a numeric field.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.