# Get Records with a query condition of "like" not returning all available results in the response

**URL:** <https://forum.kintone.dev/t/get-records-with-a-query-condition-of-like-not-returning-all-available-results-in-the-response/103>\
**Category:** General\
**Created:** [February 14, 2018, 3:07am UTC](https://forum.kintone.dev/t/get-records-with-a-query-condition-of-like-not-returning-all-available-results-in-the-response/103 "2018-02-14T03:07:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [February 14, 2018, 3:07am UTC](https://forum.kintone.dev/t/get-records-with-a-query-condition-of-like-not-returning-all-available-results-in-the-response/103/1 "2018-02-14T03:07:42Z")

</div>

When I send an API JSON request for get records of the following:

&nbsp;

{“app”:“7”,“query”:“Text\_EmailAddress like " **sshadler** “”,“fields”:[”$id",“Text\_EmailAddress”,“Text\_LastName”,“Text\_FirstName”]}&nbsp;

&nbsp;

I get the following respond from the API, two successful finds:

&nbsp;

{“records”:[{“Text\_EmailAddress”:{“type”:“SINGLE\_LINE\_TEXT”,“value”:“**[sshadler@yahoo.com](mailto:sshadler@yahoo.com)**”},“Text\_FirstName”:{“type”:“SINGLE\_LINE\_TEXT”,“value”:“Scott”},“Text\_LastName”:{“type”:“SINGLE\_LINE\_TEXT”,“value”:“Shadler”},"$id":{“type”:"\_\_ID\_\_",“value”:“30”}},{“Text\_EmailAddress”:{“type”:“SINGLE\_LINE\_TEXT”,“value”:“**[sshadler@rplaw.com](mailto:sshadler@rplaw.com)**”},“Text\_FirstName”:{“type”:“SINGLE\_LINE\_TEXT”,“value”:“Scott”},“Text\_LastName”:{“type”:“SINGLE\_LINE\_TEXT”,“value”:“Shadler”},"$id":{“type”:"\_\_ID\_\_",“value”:“21”}}],“totalCount”:null}

&nbsp;

However, if I just remove one letter at the end of the search string qualifier from&nbsp; **sshadler** &nbsp;to&nbsp; **shadle** , such as:

&nbsp;

{“app”:“7”,“query”:“Text\_EmailAddress like " **sshadle** “”,“fields”:[”$id",“Text\_EmailAddress”,“Text\_LastName”,“Text\_FirstName”]}

&nbsp;

I get no results:

&nbsp;

{“records”:[],“totalCount”:null}

&nbsp;

Why are the results of a “like” condition in text search with a get records request not consistently returned expected response?

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [February 14, 2018, 3:58pm UTC](https://forum.kintone.dev/t/get-records-with-a-query-condition-of-like-not-returning-all-available-results-in-the-response/103/2 "2018-02-14T15:58:03Z")

</div>

Hello Scott!

This is because of the search limitation in kintone that you can only search by full word, not partial word, even when you are using the “like” operation.

For example, when you are searching for a record that has a word “kintone”, you need to type the whole word “kintone” in order to get the expected results. You cannot get the same result by such as “kint”, “kinton”, etc…

In your case, I think the “@” symbol became the delimiter so “sshadler” turns out be a one word. So that’s why when you search by “sshadler” the result turns out fine, but when you search by “sshadle” you won’t get any result because there is no record with email address that has the word “sshadle”.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [February 18, 2018, 9:46pm UTC](https://forum.kintone.dev/t/get-records-with-a-query-condition-of-like-not-returning-all-available-results-in-the-response/103/3 "2018-02-18T21:46:01Z")

</div>

Since there is a limitation on returning up to 500 records in a GET records action;

How would you recommend searching a filtering on a partial word search to reduce the number of records?

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [February 19, 2018, 7:47pm UTC](https://forum.kintone.dev/t/get-records-with-a-query-condition-of-like-not-returning-all-available-results-in-the-response/103/4 "2018-02-19T19:47:26Z")

</div>

Hello Scott!

As of now, a method that I can suggest is the following:

1. Using the REST API, get all records information (may be easier if you can specify the field or filter at this point)

2. Put the specific field information from the obtained data into array.

3. Use the JS function (such as “match” or “indexOf”) to search

4. Obtain the key item from the search result and put into array.

(Repeat 3 and 4 until the records are gone)

1. Using the array information created from the step 4., create an URL query

I hope this helps!
