Jump to content
  • 0

Conditional Sorting



What is the best way to implement Google "sponsored results" type of search. I use that term very loosely just to explain my point.

I have a search form which returns search records and sorts them based on price - which is embedded within the record. I would like to sort them in a way where I can give preferential treatment to some records and list them higher than others. In other words, preferred records should be sorted higher than non-preferred even if their price is higher than non-preferred. (Almost like a 2-tier sort).

I was thinking that I might have to add a field to the record table like "preferred" and use that somehow.

Any ideas/suggestions?


Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0


Yes, you can add a "Preferred" column to the source table. For the records you want to see at the top of results, insert value "1". For all other records put value "2".

Edit your DataPage and on the 'Search Results Options' page select "Preferred" field in the first sort order dropdown (set sort order from A to Z) and in the second dropdown select your field with price (set sort order from Z to A)

Let me know if this helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...