0

I have created a custom list and one of the items in the list contains a drop down menu. containing apple,orange,banana,grapefruit. This has the title fruit. I then have modified the view where I want it to order by fruit I want it to order by the order I have given it but instead it does it alphabetically. Is there anyway to overwrite the alphabetical order and do it in the order I put down?

3 Answers 3

0

No, there is not. (I'm assuming that with "drop down menu" you mean a choice column)

If you order by the choice column, the view will always be ordered alphabetically, either ascending or descending.

The only workaround that comes to my mind is adding a numeric prefix before each value, eg:

  • 01 - apple
  • 02 - orange
  • 03 - banana
  • 04 - grapefruit
1
  • Cheers don't know why I didn't think of that in the first place :)
    – dave
    Apr 1, 2014 at 13:05
0

You cannot achieve this by using your "Fruit" column alone. The best workaround i can think of is to try creating another Calculated column called say "Order". Set formula in the calculated column to such that if Fruit Column is Orange , Set "Order" column as 1 etc , depending on the order you want to specify. Now in your view OrderBy that calculated column.

See this Blog to know more about calculated columns.

0

Use a calculated column and the Contains formula.

  1. Create a calculated column.

  2. Enter the Contains formula. Below is a template to get you started. Replace [ColumnName] with the name of your column and Text with the choice value from the column. Match the choice entry with the number you would like the entry be associated with for sorting.

    =IF([ColumnName]="TEXT",1,IF([ColumnName]="TEXT",2,IF([ColumnName]="TEXT",3,IF([ColumnName]="TEXT",4,IF([ColumnName]="TEXT",5,IF([ColumnName]="TEXT",6,IF([ColumnName]="TEXT",7,IF([ColumnName]="TEXT",8,IF([ColumnName]="TEXT",9)))))))))
    
  3. Create a view and sort by the new calculated column.

For step-by-step instructions with screenshots view my post on sorting items in a list using the Contains formula. Post: http://jennyssharepointtips.wordpress.com/2014/11/21/create-a-custom-sort-using-the-contains-formula-in-a-calculated-column/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.