Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • suzyb 474 posts 932 karma points
    Jul 09, 2012 @ 11:00
    suzyb
    0

    selecting property value from members

    I am working on a member search for an intranet site.  And I would like to offer dropdowns populated with values people have entered for certain properties.

    For example each member has a university property with the name of the institution they go to.  I would like to populate a drop down with all the unique values members have set for this property so I get a list of all the universities members go to.

    I was thinking of using examine for this.  But don't know how to write the query.

    How do I do a "not empty" using the fluent API.  And can you also do a distinct using it or will I need to filter the results to get the unique values.

    This is what I have so far, obviously this finds those with the university property not set when I want the opposite.

    filter = criteria.Field("university", string.Empty).And().OrderBy("university").Compile();

     

Please Sign in or register to post replies

Write your reply to:

Draft