Answers.Body: <p>As @Youniteus stated in a comment to this post the answer was related to <a href="https://craftcms.stackexchange.com/questions/1758/what-is-the-best-way-to-exclude-an-array-of-entries">this question</a></p>
  
  <p>I had to tweak the join statements a bit but it's working now.</p>
  
  <p>complete code here:</p>
  
  <pre><code>{# convert array to string  so we can remove these ids #}
  {% set excludedJobs = excludeRelatedJobs|join(', not ') %}
  
  {# set careers to all jobs created by author#}
  {% if not excludedJobs|length%} 
      {% set careers = craft.entries.section('careers').authorId(user.id) %}
  
  {# filter out jobs already added to store#}
  {% else %}
      {% set careers = craft.entries.section('careers').authorId(user.id).id('and, not ' ~ excludedJobs) %}
  {% endif %}
  
  &lt;ul&gt;
      {% for job in careers %}
      &lt;li&gt;&lt;a href="/careers/edit/{{ job.id }}"&gt;{{ job.title }}&lt;/a&gt;&lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-16T16:12:23.283Z
Answers.LastActivityDate: 2017-08-16T16:12:23.283Z
Answers.UserDisplayName: CreateSean
Body: <p>I am attempting to list out all jobs that the current author has created but which are not already to other entries they've created.</p>
  
  <p>I have both an array and a string containing the entry ids to exclude which I can see with these tags:</p>
  
  <pre><code>{# delete later, only here to visually show entry ids while coding #}
  &lt;p&gt;&lt;strong&gt;array:&lt;/strong&gt; {{ excludeRelatedJobs|join(', ') }}&lt;/p&gt;
  
  {# convert array to string #}
  {% set excludedJobs = excludeRelatedJobs|join(', ') %}
  
  &lt;p&gt;&lt;strong&gt;string:&lt;/strong&gt; {{ excludedJobs }}&lt;/p&gt;
  </code></pre>
  
  <p>However when I try to exclude the ids from the list they are not excluded.</p>
  
  <p>current code that should exclude ids:</p>
  
  <pre><code>{% set careers = craft.entries.section('careers').authorId(user.id).id('not' ~ excludedJobs) %}
  &lt;ul&gt;
      {% for job in careers %}
      &lt;li&gt;&lt;a href="/careers/edit/{{ job.id }}"&gt;{{ job.title }}&lt;/a&gt;&lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
  <p>If I manually exclude the id like this it works correctly:</p>
  
  <p>{% set careers = craft.entries.section('careers').authorId(user.id).id('not 581') %}</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-14T18:53:43.477Z
Comments.Text: I think that this question is related to your problem:
  https://craftcms.stackexchange.com/questions/1758/what-is-the-best-way-to-exclude-an-array-of-entries
Comments.UserDisplayName: Youniteus
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-14T19:48:58.143Z
Comments.Text: I based my code on that post. but it wasn't working
Comments.UserDisplayName: CreateSean
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-14T19:58:59.880Z
Comments.Text: Seems you need to have an "and" in there: … id('and, not' ~ excludedJobs)
Comments.UserDisplayName: KSP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-14T20:31:45.187Z
Comments.Text: I did have that but when I do it doesn't list anything at all even when it should.
Comments.UserDisplayName: CreateSean
Tags: <templating><id>
Title: exclude list of entries from craft.entries tag
ThreadText: # exclude list of entries from craft.entries tag
  
  (Asked by: username_0 on 2017-08-14)
  
  I am attempting to list out all jobs that the current author has created but which are not already to other entries they've created.
  
  I have both an array and a string containing the entry ids to exclude which I can see with these tags:
  
  ```
  {# delete later, only here to visually show entry ids while coding #}
  <p><strong>array:</strong> {{ excludeRelatedJobs|join(', ') }}</p>
  
  {# convert array to string #}
  {% set excludedJobs = excludeRelatedJobs|join(', ') %}
  
  <p><strong>string:</strong> {{ excludedJobs }}</p>
  
  ```
  
  However when I try to exclude the ids from the list they are not excluded.
  
  current code that should exclude ids:
  
  ```
  {% set careers = craft.entries.section('careers').authorId(user.id).id('not' ~ excludedJobs) %}
  <ul>
      {% for job in careers %}
      <li><a href="/careers/edit/{{ job.id }}">{{ job.title }}</a></li>
      {% endfor %}
  </ul>
  
  ```
  
  If I manually exclude the id like this it works correctly:
  
  {% set careers = craft.entries.section('careers').authorId(user.id).id('not 581') %}
  
  **Tags:** templating, id
  
  > **Comments:**
  > **username_1**: I think that this question is related to your problem: https://craftcms.stackexchange.com/questions/1758/what-is-the-best-way-to-exclude-an-array-of-entries  
  > **username_0**: I based my code on that post. but it wasn't working  
  > **username_2**: Seems you need to have an "and" in there: … id('and, not' ~ excludedJobs)  
  > **username_0**: I did have that but when I do it doesn't list anything at all even when it should.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-08-16. Score: 1 | Accepted answer
  
  As @username_1 stated in a comment to this post the answer was related to [this question](https://craftcms.stackexchange.com/questions/1758/what-is-the-best-way-to-exclude-an-array-of-entries)
  
  I had to tweak the join statements a bit but it's working now.
  
  complete code here:
  
  ```
  {# convert array to string  so we can remove these ids #}
  {% set excludedJobs = excludeRelatedJobs|join(', not ') %}
  
  {# set careers to all jobs created by author#}
  {% if not excludedJobs|length%} 
      {% set careers = craft.entries.section('careers').authorId(user.id) %}
  
  {# filter out jobs already added to store#}
  {% else %}
      {% set careers = craft.entries.section('careers').authorId(user.id).id('and, not ' ~ excludedJobs) %}
  {% endif %}
  
  <ul>
      {% for job in careers %}
      <li><a href="/careers/edit/{{ job.id }}">{{ job.title }}</a></li>
      {% endfor %}
  </ul>
  
  ```
  
  
  ---
  
  