Answers.Body: <p>Thank you very much for your support. <strong>The code shown in the question is correct.</strong></p>
  
  <p>I have replaced the relationship field - <strong>and now it works perfect</strong>. The problem could have been that I defined the field first as a number field an then changed to a relationship field - but this is just speculation.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-27T07:52:36.607Z
Answers.LastActivityDate: 2015-03-27T07:52:36.607Z
Answers.UserDisplayName: MISC
Body: <p>I try go get entries (of channel B) related to an entry (of channel A) within a list of entries (of channel A). All entries of channel B have a relationship field and at least one relation to an entry in channel A. But I get no results from channel B. </p>
  
  <pre><code>{% set entries = craft.entries.section('candidates').order('postDate asc') %}
  {% for entry in entries %}
      {% set feedbacks = craft.entries.section('candidates_feedbacks').relatedTo(entry.id) %}
      {{ entry.title }}
      {% for feedback in feedbacks %}
          {{ feedback.title }}
      {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thank you very much for your feedback.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-26T13:36:45.370Z
Comments.Text: Hmmm, I've just created sections with the same names in Craft and related entries like you are, and your code is working perfectly fine for me.  I'd double check everything is set up correctly in Craft, because that piece of code seems very straightforward.
Comments.UserDisplayName: Jamie Wade
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-26T13:38:40.613Z
Comments.Text: Yes, it looks just fine.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-26T15:58:20.367Z
Comments.Text: I'd start by `{{ entries|length }}` and `{{ feedbacks|length }}` just to make sure you're getting the results back you're expecting to get back.
Comments.UserDisplayName: Brad Bell
Tags: <relations>
Title: Entries related to an entry in a list of entries
ThreadText: # Entries related to an entry in a list of entries
  
  (Asked by: username_0 on 2015-03-26)
  
  I try go get entries (of channel B) related to an entry (of channel A) within a list of entries (of channel A). All entries of channel B have a relationship field and at least one relation to an entry in channel A. But I get no results from channel B.
  
  ```
  {% set entries = craft.entries.section('candidates').order('postDate asc') %}
  {% for entry in entries %}
      {% set feedbacks = craft.entries.section('candidates_feedbacks').relatedTo(entry.id) %}
      {{ entry.title }}
      {% for feedback in feedbacks %}
          {{ feedback.title }}
      {% endfor %}
  {% endfor %}
  
  ```
  
  What am I doing wrong?
  
  Thank you very much for your feedback.
  
  **Tags:** relations
  
  > **Comments:**
  > **username_1**: Hmmm, I've just created sections with the same names in Craft and related entries like you are, and your code is working perfectly fine for me.  I'd double check everything is set up correctly in Craft, because that piece of code seems very straightforward.  
  > **username_2**: Yes, it looks just fine.  
  > **username_3**: I'd start by `{{ entries|length }}` and `{{ feedbacks|length }}` just to make sure you're getting the results back you're expecting to get back.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-03-27. Score: 2 | Accepted answer
  
  Thank you very much for your support. **The code shown in the question is correct.**
  
  I have replaced the relationship field - **and now it works perfect**. The problem could have been that I defined the field first as a number field an then changed to a relationship field - but this is just speculation.
  
  
  ---
  
  