Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Select list order numeric values

Meena Sabnivisu June 20, 2019

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.

1 answer

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2019

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events