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') %}