Access a 'global: custom text' field in fieldpluginbase render() I'm trying to get more familiar with FieldPluginBase to create a new custom field for views. As an example I implemented a new field called 'dropdown list' that "wraps" other view-fields the user selects. Therefore I implemented a form in buildOptionsForm() that shows all currently displayed view fields and let's the user select multiple via checkboxes (kind of similar to the dropbutton behavior).  

This works well and in render() I can see which fields the user checked via $this-&gt;options['field_types'].

Next I want to add the user-chosen fields to a renderarray and display them as an item list ('#theme' =&gt; 'item_list') to later add some custom css classes and style them. However, I have currently no way of accessing all fields that are shown in the view, only the entity fields via $entity-&gt;get('field_name')-&gt;getValue(). That gives me the standard entity fields like title, body, nid ... But I do have a Global: Custom text (id='nothing_2') that I need to access (that is excluded from display and output as a custom link). I found no way of accessing the value of such fields that do not directly belong to the entity (I tried $this-&gt;view-&gt;field[...] and $this-&gt;displayHandler-&gt;getValue(...) without success). 

Any idea if what I'm trying to do is possible and what I'm missing ?

class DropDownList extends FieldPluginBase {

  public function query() {

  }

  protected function defineOptions() {
    $options = parent::defineOptions();
    $options['field_types'] = ['default' =&gt; []];
    return $options;
  }
  public function buildOptionsForm(&amp;$form, FormStateInterface $form_state) {

    $fields = $this-&gt;displayHandler-&gt;getFieldLabels(TRUE);
    $pos = array_search('dropdown_list', $fields);
    unset($fields[$pos]);

    $form['field_types'] = array(
      '#title' =&gt; $this-&gt;t('Which fields should be included?'),
      '#type' =&gt; 'checkboxes',
      '#options' =&gt; $fields,
      '#default_value' =&gt; $this-&gt;options['field_types'],
    );
    parent::buildOptionsForm($form, $form_state);
  }

  public function render(ResultRow $values) {
    $items = [];
    if ($entity = $this-&gt;getEntity($values)) {
      // Dummy loop to show how I wanted to approach this
      // Checkboxes results are available like this (in this output
      // the user only checked the custom text 'nothing_2'):
      // nothing_2=&gt;nothing_2 nid=&gt;0 title=&gt;0 body=&gt;0 uid=&gt;0
      foreach($this-&gt;options['field_types'] as $key=&gt;$value) {
        if ( $value != '0') {
          // There is no field 'nothing_2'
          $items[] = $entity-&gt;get('field_name')-&gt;getValue();
        }
      }
    }
  $build['theme_element'] = [
      '#theme' =&gt; 'item_list',
      '#title' =&gt; $this-&gt;t(''),
      '#items' =&gt; $items,
    ];
    return $build;
  }
}


UPDATE

Using $this-&gt;view-&gt;field['nothing_2']-&gt;getValue($values) as also suggested by 4k4 returns an empty string, although I know that nothing_2 contains a link: &lt;a href=....&gt;Edit&lt;/a&gt; but it does not seem to be directly contained in getValue()
As indicated by @4k4 the solution is using advancedRender() inside a for loop

public function render(ResultRow $values) {
  $items = [];
  foreach ($this-&gt;options['field_types'] as $key =&gt; $value) {
   if ($value != '0') {
    $items[] = $this-&gt;view-&gt;field[$key]-&gt;advancedRender($values);
   }
  }
$build['theme_element'] = [
  '#theme' =&gt; 'dropdownlist-theme',
  '#title' =&gt; $this-&gt;t('Dropdown List'),
  '#items' =&gt; $items,
 ];
 return $build;
}