1

I'm trying to display a users relationships through Views(3). I'm getting duplicates for accepted relationships. Also, the current user show's up under his/her own relationships. Here's what I got so far:


Format: Unformatted list
Show: Fields

Fields
User: Name
User: Picture

Filter criteria
User: Active (Yes)
(rtid) User relationships: Requester or Requestee is current user (True)

Sort criteria
User: Created date (desc)

Block name: None Access: Permission | View user profiles

Contextual filters
User relationships: Requester user // I've tried (rtid) here with the same result

Relationships
User relationships: Requestee user
User relationships: Requester user
User relationships: RTID

Use AJAX:Yes

1
  • a good example for adding a user relationship
    – Alexander
    Commented Sep 15, 2012 at 6:30

1 Answer 1

1

You can exclude current user from view by passing argument of current logged in user id and check exclude this argument from view.

You can avoid duplicates by enable distinct in basic settings.

2
  • Thank you for the response. But, in views 3 I can't get a user:current under filters or contextual filters. Also, I don't see an option for enable distinct anywhere in fields, filters, or contextual filters.
    – Graham
    Commented Aug 3, 2011 at 23:17
  • 1
    NM, figured it out. Found the Distinct under Query settings. Then, under fields I set User:Current(No). This excluded the current user. Would this be a good way of doing it though? Cause I couldn't find exclude current user under contextual filters. The closest I found was User:UID Exception Value. But, I wasn't sure what to pass as the argument.
    – Graham
    Commented Aug 4, 2011 at 3:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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