REST API returns error when reset Department or Group select "--------" in filter.

For a preset Department or Group type field, select “--------” in filter. Then invoke the following code, it returns error.

var body = {

    “app”: 54004,

    “query”: kintone.app.getQuery(), //   Group_Selection in ("")

};

  

kintone.api(kintone.api.url(’/k/v1/records’, true), ‘GET’, body, function(resp) {

    // success

    console.log(resp);

}, function(error) {

    // error

    console.log(error);

    //  code: ‘GAIA_IL27’, id: ‘CjyjMK5j9nE0chLKezLL’, message: 'The specified group (code:) not found.

});

Hi Linner

We would like to make the situation a bit clearer for future community members who look at this post.
This bug was caused by the following conditions:

  1. A Department Selection Field or Group Selection field was placed in the App
  2. The Preset departments/groups option was set for the field
  3. In the Record List view, the records were filtered through the GUI.
    The filter was set as the following:
    [Department/Group Selection field] [includes any of] [–]
  4. The script was then run in the console

 

We checked this on our end, and found that the error occurs from calling the Get Records API.
Using the queries Department_Selection in ("") or Group_Selection in ("") in the Get Records API currently causes an error to be return.
We are treating this as a bug, but we can’t set a date yet on when the bug will be fixed.

Thank you for reporting this to us!