<p>No, this is currently not possible, but there's a feature request on Craft's feedback site
that you could vote for: <a href="http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/7179163--entry-type-setting-for-entries-fields" rel="nofollow">"Entry Type" setting for Entries fields</a>.</p>

<p>As Lewis Jenkins mentioned there, you could use his plugin <a href="https://github.com/lewisjenkins/craft-lj-dynamicfields" rel="nofollow">Dynamic Fields</a> as
a workaround solution in the meantime. Something like this should give you a dropdown field with
all "myOtherChannel" entries related to a category "myCategory".</p>

<pre><code>{% set category = craft.categories.group('myCategoryGroup').slug('myCategory') %}
{% set entries = craft.entries.section('myOtherChannel').relatedTo(category).order('title asc') %}

{% for entry in entries %}
    { "value": "{{ entry.id }}", "label": "{{ entry.title|raw }}" }
    {% if not loop.last %}, {% endif %}
{% endfor %}
</code></pre>

CC BY-SA 3.0
2015-03-30T18:56:50.187Z
I'm actually wanting to do this solely in the control panel entry not on a template output page.  I basically want to be able to relate two channels and rather than pulling all 100 entries that exist in the source channel, I would like to be able to set up the relations field in the admin to filter according to a category.  That way when I create a new entry in the target channel, instead of pulling up 100 entries to choose from, I will pull up say 10 that have the category I selected when setting up the field.
Lori
CC BY-SA 3.0
2015-03-30T19:07:09.280Z
My workaround may be to create multiple category groups instead of having one category group.
Lori
CC BY-SA 3.0
2015-03-30T23:05:08.213Z
Lori that code is meant to go into the Dynamic Fields settings. It's not template code for the front end, but responsible for which entries are going to be available in the dropdown field in the Edit Entries view in your CP.
carlcs
CC BY-SA 3.0
2015-03-30T17:18:16.593Z
2015-03-30T17:18:16.593Z
carlcs
<p>Is it possible to filter relations entries field by a category in a control panel entry?</p>

<p>I would like to relate two channels using the entries field but I have 100 source entries so I was hoping to be able to filter the list by category to narrow down what is shown in the target entry. Similar to how EE Playa works which allows me to choose the category in which to pull the related entries from when I initially set up the custom field.</p>

<p>Here's a similar thread:
<a href="https://craftcms.stackexchange.com/questions/2118/filtering-searching-for-entries-by-category-in-the-control-panel">Filtering/searching for entries by category in the control panel</a></p>

<entries><control-panel><categories><filter>
Filter Entries field by category in the CP?
# Filter Entries field by category in the CP?

(Asked by: username_0 on 2015-03-30)

Is it possible to filter relations entries field by a category in a control panel entry?

I would like to relate two channels using the entries field but I have 100 source entries so I was hoping to be able to filter the list by category to narrow down what is shown in the target entry. Similar to how EE Playa works which allows me to choose the category in which to pull the related entries from when I initially set up the custom field.

Here's a similar thread:
[Filtering/searching for entries by category in the control panel](https://craftcms.stackexchange.com/questions/2118/filtering-searching-for-entries-by-category-in-the-control-panel)

**Tags:** entries, control-panel, categories, filter

---

## 1 answers

### Answer by username_1 on 2015-03-30. Score: 1

No, this is currently not possible, but there's a feature request on Craft's feedback site
that you could vote for: "Entry Type" setting for Entries fields.
As Lewis Jenkins mentioned there, you could use his plugin Dynamic Fields as
a workaround solution in the meantime. Something like this should give you a dropdown field with
all "myOtherChannel" entries related to a category "myCategory".
{% set category = craft.categories.group('myCategoryGroup').slug('myCategory') %}
{% set entries = craft.entries.section('myOtherChannel').relatedTo(category).order('title asc') %}

{% for entry in entries %}
    { "value": "{{ entry.id }}", "label": "{{ entry.title|raw }}" }
    {% if not loop.last %}, {% endif %}
{% endfor %}

> **Comments:**
> **username_0**: I'm actually wanting to do this solely in the control panel entry not on a template output page.  I basically want to be able to relate two channels and rather than pulling all 100 entries that exist in the source channel, I would like to be able to set up the relations field in the admin to filter according to a category.  That way when I create a new entry in the target channel, instead of pulling up 100 entries to choose from, I will pull up say 10 that have the category I selected when setting up the field.  
> **username_0**: My workaround may be to create multiple category groups instead of having one category group.  
> **username_1**: Lori that code is meant to go into the Dynamic Fields settings. It's not template code for the front end, but responsible for which entries are going to be available in the dropdown field in the Edit Entries view in your CP.  

---

