Hello Everyone!

I was trying to set this up with a webform submitted data field, but once I added the Filter, with the Relationship, the Display Field - Field to be used for the selective options is empty, there are no options available to select the field. Please check the screenshot, I really appreciate your help. Thanks in Advance!

CommentFileSizeAuthor
Webform Results (Webform submissions).jpg214.9 KBweb506
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

david_garcia’s picture

Please thoroughly read the module instructions. Make sure you added a compatible field to the display.

dbdrupal’s picture

I've looked everywhere I don't see what makes a filter and a field to display compatible (maybe I have not found the module instructions, if so could you please point me to them). It is not in the readme.txt and I have googled the net and don't see anything. Can someone PLEASE let me know what the special sauce is here and provide specifics on what makes a filter and a field compatible as well as non-compatible. Is there any setup required in content types or is this strictly a views setup?

Thanks!

david_garcia’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)

Compatible means this:

    $options = array();
    foreach ($this->view->display_handler->handlers['field'] as $key => $handler) {
      if ($this->BaseFieldCompatible($base_field, $handler->field)) {
        $options[$handler->options['id']] = $handler->definition['group'] . ': ' . $handler->definition['title'] . '(' . $handler->label() . ')';
      }
    }

  /**
   * Tell if two base fields are compatible.
   */
  private function BaseFieldCompatible($base_field1, $base_field2) {
    // Extended condition see https://www.drupal.org/node/2295707
    return preg_match('/^' . $base_field1 . '/', $base_field2);
  }

Greetings!

j4’s picture

What the code above means for non-technical site builders like me:

Add the field in fields above if you want it as an exposed field in filters. If you do not want to display the field, you can always exclude from display..

Hope this helps someone.

Thank you for the wonderful module!!

david_garcia’s picture

Not really... compatible means that both the filter and the field are internally pointing to the same storage field in the database..

Is there a way to know this a priori? Not really, its in the internals of the field/filter definition.

j4’s picture

Thank you David..

dbdrupal’s picture

This works alot differently than I was hoping for. Thank you for the clarification though.