1

Using Sitecore 9, I want to order alphabetically the items in a MultiList with Search field in the content editor

In the template, I have the Source:

StartSearchLocation=/sitecore/content/Parks/Imported Data/Attributes/Activities&Filter=_template:{C1CD56E2-A02F-46F2-A97A-3392E092918D}&_path:/sitecore/content/Parks/Imported Data/Attributes/Activities&SortField=__DisplayName

I've also tried using a field name for the SortField but that's not sorting either.

Ideas?

1

An option could be to use a custom implementation in the source field. You can do your own class that implements IDataSource. It'll essentially just contain a Item[] ListQuery(Item item); implementation that will return a list of selectable items of your choice. Then you just reference that class in the Source field in the format code:your.namespace.yourclass, your.assembly

0

Could you try by adding source with asc or desc in [ ] brackets. it is working for me.

StartSearchLocation=/sitecore/content/Parks/Imported Data/Attributes/Activities&Filter=_template:{C1CD56E2-A02F-46F2-A97A-3392E092918D}&_path:/sitecore/content/Parks/Imported Data/Attributes/Activities&SortField=__DisplayName [asc]

Replace [asc] according to your requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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