I have a user search view that filters using info in flexifields.
My relationships are set up correctly, and the view works fine, in the Views Preview pane.
My users started calling saying that it doesn't work; it just generates SQL errors.
After considering role permissions and clearing the views cache I finally realized that the view works from the preview pane, but not from the menu.
Long story short: the problem is that if you set up the relationships on the "Defaults" display, the relationships that pertain to flexifield tables do not transfer to your "Page" display.
Workaround:
- go to the screen to edit your view
- jump back and forth between your defaults and Page view, and watch the relationships. If you see that the flexifields realtionships are missing from the page view, then this is your problem
- select page view, add the missing relationships. Give them different names, so that you can differentiate.
- edit each filter/field that used the old relationships. You cshould find that the new relationship is selected automatically. Save each filter/field. Save the view.
To Repeat:
- add a new view. Give it a name. type: user
- Add two relationships: one that uses a flexifield, one that just links to a more regular table. (my flexield does not link directly to users, so I had to add a relationship from users to "content profile" and then another from "content profile" to my flexifield table.)
- add a page display
- you'll notice that the flexifeild relationship is only available on 'Default', but the other is available on both Defaults view and Page view