# Filtering table records via link field in REST API

**URL:** <https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198>\
**Category:** Support, Troubleshooting, & Help\
**Created:** [July 16, 2021, 5:52pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198 "2021-07-16T17:52:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Lance](https://community.tulip.co/u/Lance)\
**Post date:** [July 16, 2021, 5:52pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198/1 "2021-07-16T17:52:07Z")

</div>

I have a need to retrieve a subset of records from a table via the REST API (GET method for table records). That API allows for a ‘filters’ parameter but I’ve been unable to use it with a record link field. I’ve tried formats that make sense to me but am hoping that I’m just overlooking some combination that will work.

As an example, lets say I have a field wxyz\_link\_left\_column in the table that I’m filtering on. The records that I’m interested in retrieving all have the same “parent” with an ID of “12345”. I have tried each of the following filter parameters:

- filters=[{“field”:“wxyz\_link\_left\_column”,“functionType”:“equal”,“arg”:“12345”}]
- filters=[{“field”:“wxyz\_link\_left\_column”,“functionType”:“equal”,“arg”:"[“12345”]"}]
- filters=[{“field”:“wxyz\_link\_left\_column”,“functionType”:“contains”,“arg”:“12345”}]

All result in server errors. Is it possible to filter using the record link field of a table? If not, I assume that I’ll have to replicate the parent ID in a simple text column and use that. Not sure what a record link is offering for app development or integrations.

---

<div class="post-metadata">

**Author:** ![Lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Lance](https://community.tulip.co/u/Lance)\
**Post date:** [July 16, 2021, 5:54pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198/2 "2021-07-16T17:54:07Z")

</div>

I just noticed when I reread the post that the HTML is obscuring part of the formating in the second example. The quote within the array bracket is being escaped with a backslash () to try to preserve it during transmission.

---

<div class="post-metadata">

**Author:** ![ytadmor](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@ytadmor](https://community.tulip.co/u/ytadmor)\
**Post date:** [July 16, 2021, 8:16pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198/3 "2021-07-16T20:16:10Z")

</div>

Hi Lance,

We are planning some improvements to our filter functionality that will make this less cumbersome.

For the time being, a workaround that should accomplish what you want is to first fetch the record “12345” (the parent), then read it’s link column values (which will have some list of ids [“childId1”…]).

You can then use a filter like:

filters=[{“field”: “id”, “functionType”: “isIn”, “arg”: [LIST OF IDS]}]

---

<div class="post-metadata">

**Author:** ![Lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Lance](https://community.tulip.co/u/Lance)\
**Post date:** [July 21, 2021, 8:18pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198/4 "2021-07-21T20:18:09Z")

</div>

@ytadmor - thanks that did the trick! Very useful. The “isIn” functionType is not in the API documentation but worked as advertised.

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [July 21, 2021, 8:26pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198/5 "2021-07-21T20:26:56Z")

</div>

thanks for flagging this @Lance, we’ll be updating our API documentation to include this filter.

thanks again!!

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [July 21, 2021, 8:26pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198/6 "2021-07-21T20:26:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![ytadmor](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@ytadmor](https://community.tulip.co/u/ytadmor)\
**Post date:** [July 21, 2021, 8:35pm UTC](https://community.tulip.co/t/filtering-table-records-via-link-field-in-rest-api/3198/7 "2021-07-21T20:35:11Z")

</div>

Those fixes to the documentation should be included in our next release 🙂
