For various reasons I'm programmatically rendering a view, and would like to be able to programmatically set filters, and then have the Views Data export pick up both the programmatically set filters, and some exposed filter values...

How do this? Is this possible?

My code for the filter setting and rendering:

$view = views_get_view('tin_can_package_answer_statements');
  $view->set_display('default');
  $filters = $view->display_handler->get_option('filters');
  $filters['activity_id']['value'] = $package->course_activity_id;
  $view->display_handler->override_option('filters', $filters);

  $content = $view->preview('default');

Comments

markusa created an issue.

markusa’s picture

the views data export display is set to attach to the Master display