I have a cck where one of the field is the user referenced filed (of a particular role) - the filed name is kids_name
In D5 i had a view where the filter was set to
kids_name = is one of = "currently logged in user"
This meant that when the user logged in - he or she could only see records pertaining to him or her (as the view filtered it matching the kids_name filed with currently logged in user field)
Now i am in Drupal6.6 with Views2 and i can;t find a way to do it.
If in filter i select the [content] = "kids_name" - then i only get the list of names to filter by - i do not get the option of filter by currently logged in user.
I am sure this must be a simple thing to do - pl guide me how to?
Comments
Comment #1
merlinofchaos commentedUnder the relationships section, add a relationship for the userreference.
Then, under filters, add a filter for is the logged in user. Select the relationship you just added.
Comment #2
ratnesh aarohi commentedthank you - it works like a charm
Comment #3
ratnesh aarohi commentedComment #4
clintthayer commentedHey folks...
I'm trying to do the same thing, have done the suggested modification to my view, but for some reason, it does not seem to be working! Once I create the filter, the resulting view shows no contents. I've double checked the contents in my field, the relationship, and the filter and it all seems right. What could I be missing?
thanks for the help...
Comment #5
ratnesh aarohi commentedPl give more info - for us to guess where things could be going wrong