locked
Multiple condition on Filtering clause RRS feed

  • Question

  • Hi all,

     

    I'm trying to implement a filtering data with multiple condition for a column. For example: I would like to filter CategoryType that has one or some values. I would like to have a filtering clause like:

    [side].[CategoryType] IN 'List of category'

    Note that: the number item in list is determined at runtime and depends on specific user. 

    Could I do this thing with MSF?

     

    Thanks.

    Minh.

    Wednesday, November 17, 2010 5:49 PM

Answers

  • if the 'List of Category' for a user is in a table, you can define a filter column for the user.

    the filter clause would look like this:

    [side].[CategoryType] IN (Select CategoryType from UserCategoryList where UserId=@UserId)

    • Marked as answer by hanami279 Thursday, November 18, 2010 2:14 AM
    Thursday, November 18, 2010 12:35 AM
  • yes, you have to address them manually as Sync Fx doesnt automatically handle rows going out of scope.
    • Marked as answer by hanami279 Thursday, November 18, 2010 9:33 AM
    Thursday, November 18, 2010 4:01 AM

All replies

  • if the 'List of Category' for a user is in a table, you can define a filter column for the user.

    the filter clause would look like this:

    [side].[CategoryType] IN (Select CategoryType from UserCategoryList where UserId=@UserId)

    • Marked as answer by hanami279 Thursday, November 18, 2010 2:14 AM
    Thursday, November 18, 2010 12:35 AM
  • Thank you for your reply. It's exactly what I need right now.

    I also have another questions in this topic. Sometimes, categories can be removed from CategoryList for user. At this time, Sync Framework could not remove rows that go out-side filter range. do I need remove these rows manually?

     

    Thanks in advance.

    Thursday, November 18, 2010 2:14 AM
  • yes, you have to address them manually as Sync Fx doesnt automatically handle rows going out of scope.
    • Marked as answer by hanami279 Thursday, November 18, 2010 9:33 AM
    Thursday, November 18, 2010 4:01 AM