Smart Search Results sorting ascending and ignoring empty values

Tommy De Notarpietro asked on April 19, 2017 12:24

Within the Smart Search Results webpart, for the "search sort" property, is there an easy way to sort a column value ascending, but have the empty values last?

When you sort a column ascending, you'll have the empty values first.

Recent Answers


Brenden Kehren answered on April 19, 2017 16:15

Do something like this:

ORDER BY CASE WHEN LEN(YourField) > 0 THEN 0 ELSE 1 END, YourField

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.