I have multiple flags
flag1
flag2
flag3
flag4

each with content that is flagged.

I want to show the location of all of the flagged content in flag1, flag2, flag3, but not flag4

How can I do that?

Flag relationships already filter content so i can't just have all the relationships on one view.

I was used to nodeuque where the relationship was used in conjunction with the filter to filter the information needed
also in nodequeue items were not automatically filtered via the relationship unless I choose to add a filter.

I bring this up to know how can I achieve my goals with Flag module.

thanks

Comments

socialnicheguru’s picture

Status: Active » Fixed

I think I answered my own question. Maybe this will be useful to others.

under the relationship uncheck includes only flagged content
add the flag filter for each content type
user views_or to or the filters so all will show up

socialnicheguru’s picture

Status: Fixed » Active

Hmmm... this doesn't seem to be working.

if any one of the queues is empty then nothing shows up regardless of whether I use the views_or function for views 2.

socialnicheguru’s picture

Title: displaying content from multiple flag queues on the same map » displaying content from multiple flags on the same view

i tried with flag counter for flags 2.

I tried to filter two flags using views_or with two flags.I removed all other items from the filter
I get this for the sql call:

((flag_counts_node_1.count IS NOT NULL) OR (flag_counts_node.count IS NOT NULL))
it looks right, but I don't get a value (yes I should be getting one. Instead it returns the empty set

This is a little frustrating. I switched from nodequeue because of the rules integration for this module. I'd hate to have to switch back :(

grendzy’s picture

hm, I thought I had this issue, but it turned out I just accidentally used the same relationship twice in my filter list. I would double-check that each of the two relationships joins a unique flag, and likewise with the filters.

So I have two exposed filters, and queries like flag_1 IS NULL AND flag_2 IS NOT NULL work fine.

quicksketch’s picture

Status: Active » Closed (fixed)

This is the same request as #695558: Can Flags 1 support multiple flags on the same view. And just like that request, this is not possible with Views 2. Views 3 supposedly provides native "OR" support so you can construct such queries. Closing this issue after a lack of activity.

davemaxg’s picture

Just in case it helps anyone, I've been able to achieve this with Views 2 using Views_Or for the fitlers and Views_PHP to combine multiple identical fields into a single field. The COALESCE functionality of Views_Or was not sufficient to combine multiple identical fields into one because I was joining to User and Anonymous would display when there was no flag.

I used Views Or to filter out the Anonymous user on all relationships. Here's what my relationships look like:
Flags: my_flag1 by any user
Flags: my_flag2 by any user
Flags: my_flag3 by any user
(My 1 Flags) Flags: User
(My 2 Flags) Flags: User
(My 3 Flags) Flags: User

The end result is a filtered view of all flagged content among 3 different flags.