Answers.Body: <p>I found this to work for what I needed:</p>
  
  <pre><code>{% set nextImage = image.getNext() %}
  {% if nextImage %}
  
      {% if nextImage.checkboxFieldHandle.contains('value') %}
          {# Do something #}
      {% endif %}
  
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-28T10:55:09.303Z
Answers.LastActivityDate: 2014-11-28T10:55:09.303Z
Answers.UserDisplayName: James
Answers.Body: <p>I never used that <a href="http://buildwithcraft.com/docs/templating/assetfilemodel#getNext" rel="nofollow"><code>getNext()</code></a> method with <code>craft.asset</code>, but maybe it works if you explicitly feed it with parameters?</p>
  
  <p>Another idea is to use loop variables:</p>
  
  <pre><code>{% set myClass = not loop.last and entry.myAssets[loop.index].fieldName == '1' ? ' YEY' %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-24T15:11:24.737Z
Answers.LastActivityDate: 2014-10-24T15:11:24.737Z
Answers.UserDisplayName: carlcs
Body: <p><code>asset.getNext().fieldName</code> does not work but might help explain what I was aiming for.</p>
  
  <p>To be more specific, for where there are multiple images in an entry, I want to assign a class to each depending on its next image’s field value. Also, the field I’m trying to get a value from is a radio field.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-24T13:06:37.680Z
Comments.Text: Not really - can you please post more detail?
Comments.UserDisplayName: Brandon Kelly
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-24T13:31:53.507Z
Comments.Text: Can you post your full template code? Sounds like `asset.getNext().fieldName` should work, but hard to tell without seeing more code.
Comments.UserDisplayName: Brandon Kelly
Tags: <assets>
Title: How to get a field value from next/prev asset
ThreadText: # How to get a field value from next/prev asset
  
  (Asked by: username_0 on 2014-10-24)
  
  `asset.getNext().fieldName` does not work but might help explain what I was aiming for.
  
  To be more specific, for where there are multiple images in an entry, I want to assign a class to each depending on its next image’s field value. Also, the field I’m trying to get a value from is a radio field.
  
  **Tags:** assets
  
  > **Comments:**
  > **username_1**: Not really - can you please post more detail?  
  > **username_1**: Can you post your full template code? Sounds like `asset.getNext().fieldName` should work, but hard to tell without seeing more code.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2014-11-28. Score: 2 | Accepted answer
  
  I found this to work for what I needed:
  
  ```
  {% set nextImage = image.getNext() %}
  {% if nextImage %}
  
      {% if nextImage.checkboxFieldHandle.contains('value') %}
          {# Do something #}
      {% endif %}
  
  {% endif %}
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2014-10-24. Score: 1
  
  I never used that [`getNext()`](http://buildwithcraft.com/docs/templating/assetfilemodel#getNext) method with `craft.asset`, but maybe it works if you explicitly feed it with parameters?
  
  Another idea is to use loop variables:
  
  ```
  {% set myClass = not loop.last and entry.myAssets[loop.index].fieldName == '1' ? ' YEY' %}
  
  ```
  
  
  ---
  
  