order by the order of 'in' operator

There is an ‘in’ operator in the ‘query’ parameter of records.json, like below:

Record_number in (“8”, “2”, “11”…)

I would like to know if there is a way to order the query results by the order of record numbers’ order in ‘in’ operator?

Hi Aaron,

In Kintone, sorting can only be done in ascending or descending order. It cannot be sorted in the order of “in”. If you want to do,  you have to create a process to do the sort based on the information obtained.


Hi Aaron, 

To add onto Junko Werner’s answer, ‘in’ is an operator for Check box, radio button, drop-down, and multi-choice fields.  It is used to find what choices have been selected for the fields previously mentioned, the fields with multiple selections.  


You can find more information about the ‘in’ operator here: https://developer.kintone.io/hc/en-us/articles/360019245194#optfunc

Hi Gus, Junko,

Thanks for your help.

I referred the page before, but I am considering using the ‘in’ operator to retrieve records according to given record numbers in one of my use scenario.

I guess I have to create a process to do the sort locally after I got the records as Junko suggested in this case.