1

I have created a view, with some aggregation parameters.

I expected that unsetting (removing) the aggregation field via some view hook (views_pre_render?) would do the trick to disable the aggregation caused by this field.

But it just removes the field from the table, the results are the same (aggregated by the unsetted field, even if it is removed).

some ideas? thanks

2
  • I don't know the answer of the top of my head, but if you export the view with and without aggregation settings, you might get an idea of what to change. I'd suggest that hook_views_pre_render() is a bit late to be doing the change because the query's already been built and run.
    – Andy
    Jul 24, 2014 at 10:25
  • Thanks Andy, with pre_build worked fine and the aggregation disappears. function views_test_views_pre_build(&$view) { unset($view->field['my_field']); } Jul 24, 2014 at 13:56

1 Answer 1

0

with pre_build worked fine and the aggregation disappears.

function views_test_views_pre_build(&$view) { unset($view->field['my_field']); }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.