Sort By Ascending/Descending Date/Time Forum Thread Post in Smart Search Filter from Smart Search Re

Sam Mueller asked on December 12, 2016 18:26

I'm trying to create a Smart Search Filter that will sort the results of forum posts by date/time. I would like to create a radio button or checkbox that says "Ascending" and "Descending" which will sort the queried results according to date created.

In the Values field of the filter, I'm not sure how to fetch the date/time data of the forum results. Is it by classname? Could anyone shed some light on this?

Correct Answer

Sam Mueller answered on December 12, 2016 22:53

I sorted it out and this is what worked for me:

Value Field:
posttime ASC;;Ascending
posttime DESC;;Descending

Filter Clause: Must

Filter is conditional: Unchecked

I had an issue where the sorted result was not persisting upon page change. I realized through trial and error that Filter auto postback was the culprit. I had this checked, this needs to be unchecked if you're loading more than one page.

0 votesVote for this answer Unmark Correct answer

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