How do i perform a distinct for a specifc field via Fetchentitycolelction

Posts   
 
    
gemfore
User
Posts: 35
Joined: 30-Jul-2010
# Posted on: 05-Aug-2010 11:40:19   

Hi How do i perform a distinct for a specifc field via Fetchentitycolelction and getdbcount.

The field isnt a primary field rather a foriegn key however the is there a way to pick a specific field to perform a disinct again.

Thanks in advance Gemfore

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 05-Aug-2010 12:05:20   

To fetch one field, you should use a DynamicList (with one field), not an entityCollection. Then on the fetch method, specify false for the allowDuplicate paramater.