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

merlinofchaos’s picture

Status: Active » Fixed

Under 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.

ratnesh aarohi’s picture

thank you - it works like a charm

ratnesh aarohi’s picture

Status: Fixed » Closed (fixed)
clintthayer’s picture

Version: 6.x-2.1 » 6.x-2.2

Hey 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...

ratnesh aarohi’s picture

Pl give more info - for us to guess where things could be going wrong