Making words into number in a view

Here is the first column formula I have in a view. I want to categorize the view by the numbers not the words. It is not working. Any suggestions?

@If(Reqstatus = “new” ; 1 ; Reqstatus = “active” ; 2 ; Reqstatus = “inactive” ; 3 ; Reqstatus = “declined” ; 4; Reqstatus = “completed” ; 5 ;“”)

Subject: Making words into number in a view

What exactly is not working?

Modify it like this:

@If(Reqstatus = “new” ; “A” ; Reqstatus = “active” ; “B” ; Reqstatus = “inactive” ; “C” ; Reqstatus = “declined” ; “D”; Reqstatus = “completed” ; “E” ;“”)

And see if it makes a difference.

My assumption here is that you are using this as a hidden column and really displaying the text? Also, remember that case sensitivity is applicable here.

Subject: Making words into number in a view

I unchecked the “Categorized is flat version 5 or greated” I don’t remember checking that in the first place but that seemed to do the trick. What is that anyways?

Thank you for your time and suggestions.

Subject: Making words into number in a view

That formula should work, what’s happening in the View?

Is the column categorised?

Subject: Making words into number in a view

What’s it doing is going in the order of the words… Not the values of the if statement. Even if I use letters. Yes it is categorized.

Subject: Making words into number in a view

You’re on the right track.

Make your first column hidden and sorted with your formula:

@If(Reqstatus = “new” ; 1 ; Reqstatus = “active” ; 2 ; Reqstatus = “inactive” ; 3 ; Reqstatus = “declined” ; 4; Reqstatus = “completed” ; 5 ; 99)

Make the second column sorted and categorized:

Reqstatus