- Posts: 12
- Joined: Wed Sep 02, 2015 6:53 pm
We are using the soap api to search a Thunderstone profile that has several parametric fields defined. The values for these fields are in a database table configured using DBWalker.
Our application will allow users to pick which field they want to sort by, from a small subset of these parametric fields, so I don't want to hard-code the ORDER BY clause.
So, on the Search Settings page I've checked the "Sortable" checkboxes for the couple of fields we want to be able to sort by. I can now get sorted results in the soap calls by including the ns:order parameter. But the results are always sorted ascending. Is there any way to request a descending sort on these fields through the api?
- Site Admin
- Posts: 344
- Joined: Tue Oct 26, 2004 5:35 pm
Yes, each field specified in the order variable may have an optional -a or -d suffix to indicate ascending (default) or descending order. E.g. Price-a,Quantity would sort results by Price ascending, then by Quantity ascending.