Page 1 of 1

descending sort on parametric field with soap api

Posted: Thu Oct 22, 2015 4:26 pm
by brittonclair
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?

descending sort on parametric field with soap api

Posted: Thu Oct 22, 2015 4:53 pm
by jason112
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.

descending sort on parametric field with soap api

Posted: Mon Oct 26, 2015 9:28 am
by brittonclair
Thank you so much!