I have a hierarchy of items. Each level of t...

ux
(Andrew Eills) #1

I have a hierarchy of items.

Each level of the hierarchy has a reference number,

which is a Text type column, so for instance 2.5.4.7 or 10.2.4.3

My problem is using these numbers to sort in a table view.

The sort will put a ‘10’ before a ‘2’ or a ‘9’, etc, so

1.5.20.4 10.8.8.4 2.4.21.3

instead of

1.5.20.4 2.4.21.3 10.8.8.4

I couldn’t find anything on this in the documentation or forum.

Does anyone know a way to achieve a ‘numeric’ sort on ‘text’ numbers?

Thx

(Bellave Jayaram) #2

You could create a number type VC with formula NUMBER(CONCATENATE(SPLIT([ColName],"."))) and sort using that.

(Aleksi Alkio) #3

One way is NUMBER(INDEX(SPLIT([ColName],"."),1)) and then sort with that number. If you need to sort with the 2nd value as well, you can create another VC with the formula NUMBER(INDEX(SPLIT([ColName],"."),2)) and so on.

(Andrew Eills) #4

Thanks, guys.

I’ll have a look at both these ideas.