Is it possible to use operators like 'or' , 'and' with the filter params of the sync scopes?

问题 Is it possible to use operators like 'or' , 'and' with the filter params of the sync scopes?

  • Friday, April 20, 2012 7:43 PM
     
      Has Code

    Hello I want to know if is there any way to send the parameters in the url with operators.

    I have this filter parameter:

     config.AddFilterParameterConfiguration("UserName", "USER", "@UserName", typeof(string));

    what I want to do is to return the data of two different users. I can do it for one user like this:

    http://localhost/Syncservicebroca/UserScopeSyncService.svc/userscope/downloadchanges?Username=luis

    Is it possible to use an 'or' operator with the URL so that I can return the data for the two users?

    Thanks for your help...


    • Edited by mejialuis28 Friday, April 20, 2012 7:50 PM
    •  

All Replies

  • Wednesday, April 25, 2012 9:49 AM
     
      Has Code

    I think this would work fine:

    <SyncTable Name="Users" FilterClause="[side].Username = @Username1 OR [side].Username = @Username2">

    But be aware: there is quite a few things to stumble upon when designing syncscope filters. The most important thing to understand is the limitation of syncfx that it does not support "partition realignment", which is when the data changes in the filtered columns (see here, here and here).

    • Edited by M.Bi Wednesday, April 25, 2012 9:49 AM
    •