Posted on 27/09/2023 14:58:34
							
							
						 
						Hi Stephen,
 
Currently you cannot choose that in the UI, but you can do that int he templates. Assuming you are using Swift, search for the instances of facet.Options and based on facet, you can use a simple LINQ expression to sort by Label, Value or Amount of results.
For example:
	- foreach (FacetOptionViewModel option in facet.Options.OrderBy(f => f.Label))
 
	- foreach (FacetOptionViewModel option in facet.Options.OrderBy(f => f.Value))
 
	- foreach (FacetOptionViewModel option in facet.Options.OrderBy(f => f.Count))
 
	- foreach (FacetOptionViewModel option in facet.Options.OrderByDescending(f => f.Label))
 
	- foreach (FacetOptionViewModel option in facet.Options.OrderByDescending(f => f.Value))
 
	- foreach (FacetOptionViewModel option in facet.Options.OrderByDescending(f => f.Count))
 
 
Ideally you'd make this decision per facet, so you could so something like this instead:
	- var sortedFacetOptions = facet.Name == "My special facet" ? facet.Options.OrderBy(f => f.Value) : facet.Options;
	foreach (FacetOptionViewModel option in sortedFacetOptions) 
 
There are a number of ways to go about this, but ultimately, I believe the 6 variations of Label, Value and Count, Asc vs Desc, should get you all possibilities you may need.
 
Best Regards,
Nuno Aguiar
 
 
Best Regards,
Nuno Aguiar