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

(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 or

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

instead of

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?


(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.