Answers.Body: <p>Not sure if you're still looking for an answer, but relation support has just been added to <a href="https://github.com/engram-design/SuperTable" rel="nofollow">Super Table 0.3.7</a>. Previously, relations wouldn't work with Super Table, as its a little bit of a special field, having sub-queries to perform for relations (each row).</p>
  
  <p>You can now query fields just like Matrix:</p>
  
  <pre><code>{% set reverseRelatedElements = craft.supertable.getRelatedElements({
   relatedTo : {
     targetElement: entry,
     field: 'superTableFieldHandle.columnHandle'
   },
   elementType : 'Entry',
   criteria: {
     section: 'someSection'
   }
  }) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-21T15:28:01.307Z
Answers.LastActivityDate: 2015-10-21T15:28:01.307Z
Answers.UserDisplayName: crawf
Answers.Body: <p>Do you need the targetElement option? Could you not just do:</p>
  
  <pre><code>{% set services = craft.entries.section('services').relatedTo(row.serviceCategory) %}
  </code></pre>
  
  <p>Also where is <code>row</code> coming from, because your not defining that anywhere? </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-14T13:07:06.803Z
Answers.LastActivityDate: 2015-07-14T13:07:06.803Z
Answers.UserDisplayName: Jason Mayo
Body: <p>I'm been kicking myself for hours and going round in circles trying to get list of entries displayed by category when the category is selected from within a SuperTable (static table) row. I would really appreciate if someone could please help point me in the right direction.</p>
  
  <p>I have a structure entries section named "services" with a number of entries created.
  I have a category group named "serviceCategories"
  I have a "SuperTable" static table field handle named "service"
  In my SuperTable I have a row named "serviceCategory" which allows me to select a single category from the category group named "serviceCategories".</p>
  
  <p>I'd like to create a standalone web page that displays all the category titles with the list of related entries.</p>
  
  <p>I've tried:</p>
  
  <pre><code>{% set categories = craft.categories.group('serviceCategories') %}
  {% for category in categories %}
  
    {{ category.title }}
  
    {% set services = craft.entries.section('services').relatedTo(
      { targetElement: row.serviceCategory }
    ) %}
  
    {% for service in services %}
      {{ service.title }}
    {% endfor %}
  
  {% endfor %}
  </code></pre>
  
Tags: <categories><category><plugin-supertable>
Title: Display entries by Category (Category in Super Table)
ThreadText: # Display entries by Category (Category in Super Table)
  
  (Asked by: username_0 on 2015-07-14)
  
  I'm been kicking myself for hours and going round in circles trying to get list of entries displayed by category when the category is selected from within a SuperTable (static table) row. I would really appreciate if someone could please help point me in the right direction.
  
  I have a structure entries section named "services" with a number of entries created.
  I have a category group named "serviceCategories"
  I have a "SuperTable" static table field handle named "service"
  In my SuperTable I have a row named "serviceCategory" which allows me to select a single category from the category group named "serviceCategories".
  
  I'd like to create a standalone web page that displays all the category titles with the list of related entries.
  
  I've tried:
  
  ```
  {% set categories = craft.categories.group('serviceCategories') %}
  {% for category in categories %}
  
    {{ category.title }}
  
    {% set services = craft.entries.section('services').relatedTo(
      { targetElement: row.serviceCategory }
    ) %}
  
    {% for service in services %}
      {{ service.title }}
    {% endfor %}
  
  {% endfor %}
  
  ```
  
  **Tags:** categories, category, plugin-supertable
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-10-21. Score: 3 | Accepted answer
  
  Not sure if you're still looking for an answer, but relation support has just been added to [Super Table 0.3.7](https://github.com/engram-design/SuperTable). Previously, relations wouldn't work with Super Table, as its a little bit of a special field, having sub-queries to perform for relations (each row).
  
  You can now query fields just like Matrix:
  
  ```
  {% set reverseRelatedElements = craft.supertable.getRelatedElements({
   relatedTo : {
     targetElement: entry,
     field: 'superTableFieldHandle.columnHandle'
   },
   elementType : 'Entry',
   criteria: {
     section: 'someSection'
   }
  }) %}
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2015-07-14. Score: 1
  
  Do you need the targetElement option? Could you not just do:
  
  ```
  {% set services = craft.entries.section('services').relatedTo(row.serviceCategory) %}
  
  ```
  
  Also where is `row` coming from, because your not defining that anywhere?
  
  
  ---
  
  