Answers.Body: <p><a href="https://docs.craftcms.com/v3/dev/element-queries/entry-queries.html#orderby" rel="nofollow noreferrer">orderBy()</a> should do the trick.
  The docs show following syntax: <code>.orderBy('elements.dateCreated asc')</code></p>
  
  <p>Maybe something like:</p>
  
  <pre><code>{% set entriesList = craft.entries.section('parks')
     .relatedTo(entry.Line.one())
     .orderBy('elements.tableName.row(n).columnName asc')
     .all
  %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T12:16:55.720Z
Answers.Text: Nope. Just a Error. :/
Answers.UserDisplayName: Markus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T13:35:36.433Z
Answers.Text: Have you replaced tableName, n and columName with your specific details? Maybe use [] instaed of () for the row "elements.tableName.row[n].columnName"?
Answers.UserDisplayName: phaetons
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T13:43:24.510Z
Answers.Text: Another possible solution: .orderBy('elements.tableFieldName[n] asc') where n = row number
Answers.UserDisplayName: phaetons
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T14:35:01.987Z
Answers.Text: tableName and columnName - Yes but what is the n for? I thought near.
Answers.UserDisplayName: Markus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T14:39:15.043Z
Answers.Text: .orderBy('elements.parkInfo.row(n).person asc')
Answers.UserDisplayName: Markus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T14:47:12.997Z
Answers.Text: here is the error i get Error Info: Array
  (
      [0] => 42000
      [1] => 1064
      [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`personen`) `subquery`
  INNER JOIN `entries` `entries` ON `entries`.`id` = `subq' at line 13
  )
Answers.UserDisplayName: Markus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T15:30:16.957Z
Answers.Text: n = row number. You have "person" in the orderBy statement but "personen" in the error. Anyway, ist is possible that "row" didn't work. Did you test my second suggestion?
Answers.UserDisplayName: phaetons
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T15:46:25.687Z
Answers.Text: Yes i tried both. I found a solution with the supersort Plug-In and ('natsort') option for the Title - because the Title has the same Number too. Not the best Method i think but it work. Anyway, thanks for the help.
Answers.UserDisplayName: Markus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T11:49:05.283Z
Answers.LastActivityDate: 2018-12-10T11:49:05.283Z
Answers.UserDisplayName: phaetons
Body: <pre><code>% set entriesList = craft.entries.section('parks').relatedTo(entry.Line.one()).all %}
      {% if entriesList|length %}
      &lt;div id="found-in" class="park"&gt;
          &lt;ul&gt;
              {% for entry in entriesList %}
              &lt;li&gt;&lt;a class="underline" href="{{entry.url}}"&gt;{{entry.title}}&lt;/a&gt;&lt;/li&gt;
              {% endfor %}
          &lt;/ul&gt;
      &lt;/div&gt;
      {% endif %}
  </code></pre>
  
  <p>Every Element has a Table where a Number is set
  I want to order it by the Number. How can i do it? </p>
  
  <p>Thanks</p>
  
Tags: <craft3><relations><table-field>
Title: order by Table Number Field
ThreadText: # order by Table Number Field
  
  (Asked by: username_0 on 2018-12-10)
  
  ```
  % set entriesList = craft.entries.section('parks').relatedTo(entry.Line.one()).all %}
      {% if entriesList|length %}
      <div id="found-in" class="park">
          <ul>
              {% for entry in entriesList %}
              <li><a class="underline" href="{{entry.url}}">{{entry.title}}</a></li>
              {% endfor %}
          </ul>
      </div>
      {% endif %}
  
  ```
  
  Every Element has a Table where a Number is set
  I want to order it by the Number. How can i do it?
  
  Thanks
  
  **Tags:** craft3, relations, table-field
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-10. Score: 1
  
  [orderBy()](https://docs.craftcms.com/v3/dev/element-queries/entry-queries.html#orderby) should do the trick.
  The docs show following syntax: `.orderBy('elements.dateCreated asc')`
  
  Maybe something like:
  
  ```
  {% set entriesList = craft.entries.section('parks')
     .relatedTo(entry.Line.one())
     .orderBy('elements.tableName.row(n).columnName asc')
     .all
  %}
  
  ```
  
  > **Comments:**
  > **username_0**: Nope. Just a Error. :/  
  > **username_1**: Have you replaced tableName, n and columName with your specific details? Maybe use [] instaed of () for the row "elements.tableName.row[n].columnName"?  
  > **username_1**: Another possible solution: .orderBy('elements.tableFieldName[n] asc') where n = row number  
  > **username_0**: tableName and columnName - Yes but what is the n for? I thought near.  
  > **username_0**: .orderBy('elements.parkInfo.row(n).person asc')  
  > **username_0**: here is the error i get Error Info: Array (     [0] => 42000     [1] => 1064     [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`personen`) `subquery` INNER JOIN `entries` `entries` ON `entries`.`id` = `subq' at line 13 )  
  > **username_1**: n = row number. You have "person" in the orderBy statement but "personen" in the error. Anyway, ist is possible that "row" didn't work. Did you test my second suggestion?  
  > **username_0**: Yes i tried both. I found a solution with the supersort Plug-In and ('natsort') option for the Title - because the Title has the same Number too. Not the best Method i think but it work. Anyway, thanks for the help.  
  
  ---
  
  