I tried to add a view(a) as a field in another view(b). The problem is that because the view a is an aggregated one (I use count to group all results into a number), when it got embedded in view b as a field, all the results of the view a are shown one by one. So to solve this I tried to aggregate the embedded field again. After that I got the error message that SQLSTATE[42S22]: Column not found: 1054 Unknown column 'view' in 'field list'.
So I turn "use aggregate" off, then the error message turns into:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM node node' at line 1
I also tried to use "Aggregate queries", but that gives no result at all.
So to put it short, I was hoping to show a view (just a aggregated field showing the numbers of all of the results) in another view as a field, and that's where I run into troubles. I'm not sure if that's because I didn't do it right or not. Any feedback would be greatly appreciated!
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | vfv-1881036.patch | 588 bytes | damiankloip |
| 1.png | 34.25 KB | DrupalDan |
Comments
Comment #1
damiankloip commentedI'm not surprised. That is probably because you are trying to perform an aggregation function on a computed field, this doesn't exist in the database, so this will never work. I think you're approach is wrong. Wouldn't you want to use aggregation on the child view, not on the view field? then you could get a count from the result of that view?
Comment #2
damiankloip commentedLet's just make it so that this isn't actually possible.
Comment #3
damiankloip commentedLet's change the title.
Comment #4
damiankloip commentedCommitted.