Body: <p>Having an issue searching a Matrix field for a block with a certain value and storing the entire block in a variable. Right now it only seems to be storing the <code>location</code> value. The <code>navigations</code> field is a Super Table.  </p>
  
  <pre><code>{## looping through matrix blocks works ##}
  {% for block in siteNav.navigations %}
  
      {{ block.location }}
  
      {% for row in block.navLinks %}
          {{ row.label }}&lt;br&gt;
      {% endfor %}
  {% endfor %}
  
  {## set variable via search matrix block only selects location field ##}
  {% set utilityNav = siteNav.navigations.location('utility').limit(1) %}
  
  {{ utilityNav.location }}
  
  {% for row in utilityNav.navLinks %}
    {{ row.label }}&lt;br&gt;
  {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-11T21:39:27.687Z
Comments.Text: Having a hard time following this for some reason. I'm guessing your top example works, but the bottom doesn't?  What's the `location` field? Are you getting an error when you try to loop through `utilityNav.navLinks`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-12T11:25:38.227Z
Comments.Text: Sorry about that. You're correct–the top example works. The bottom example only parses the `location` text field in the matrix block. I'm not able to loop through `utilityNav.navLinks` super table field– no errors either.
Comments.UserDisplayName: Siebird
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-12T11:33:13.403Z
Comments.Text: *correction. `location` field is a dropdown
Comments.UserDisplayName: Siebird
Tags: <matrix><plugin-supertable>
Title: Storing a Matrix block data in a variable
ThreadText: # Storing a Matrix block data in a variable
  
  (Asked by: username_0 on 2016-10-11)
  
  Having an issue searching a Matrix field for a block with a certain value and storing the entire block in a variable. Right now it only seems to be storing the `location` value. The `navigations` field is a Super Table.
  
  ```
  {## looping through matrix blocks works ##}
  {% for block in siteNav.navigations %}
  
      {{ block.location }}
  
      {% for row in block.navLinks %}
          {{ row.label }}<br>
      {% endfor %}
  {% endfor %}
  
  {## set variable via search matrix block only selects location field ##}
  {% set utilityNav = siteNav.navigations.location('utility').limit(1) %}
  
  {{ utilityNav.location }}
  
  {% for row in utilityNav.navLinks %}
    {{ row.label }}<br>
  {% endfor %}
  
  ```
  
  **Tags:** matrix, plugin-supertable
  
  > **Comments:**
  > **username_1**: Having a hard time following this for some reason. I'm guessing your top example works, but the bottom doesn't?  What's the `location` field? Are you getting an error when you try to loop through `utilityNav.navLinks`?  
  > **username_0**: Sorry about that. You're correct–the top example works. The bottom example only parses the `location` text field in the matrix block. I'm not able to loop through `utilityNav.navLinks` super table field– no errors either.  
  > **username_0**: *correction. `location` field is a dropdown  
  
  ---
  
  ## 0 answers
  
  