2

I have a library to store files (obvious) with column "City" which is a lookup to list with two columns (CityName & Order).

How to change ordering of options in dropdown field (which is in NewForm.aspx)?

At this moment it's still sorted by ascending ID. In list AllItems view shows it as it should be (sorted by "order").

1
  • Are you using Infopath? Commented Feb 11, 2016 at 15:48

1 Answer 1

0

All lookup column choices are sorted alphabetically by default. Apparently you will need to use jQuery for that. I've found an article which is very similar to what I followed a while back: http://sympmarc.com/2012/05/11/using-spfilterdropdown-to-reorder-options-in-a-dropdown-on-a-sharepoint-form/

$().SPServices.SPFilterDropdown({ relationshipWebURL: "/", // The source list for the Recommendation site Column is in the root site relationshipList: "Recommendations", relationshipListColumn: "Title", relationshipListSortColumn: "SortOrder", columnName: "Recommendation", CAMLQuery: "<Neq><FieldRef Name='Title' /><Value Type='Text'></Value></Neq>", // Get all values by specifying a non-blank Title debug: true // Debug mode on while we're developing }); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.