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?

  • sexta-feira, 20 de abril de 2012 19:43
     
      Contém Código

    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...


    • Editado mejialuis28 sexta-feira, 20 de abril de 2012 19:50
    •  

Todas as Respostas

  • quarta-feira, 25 de abril de 2012 09:49
     
      Contém Código

    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).

    • Editado M.Bi quarta-feira, 25 de abril de 2012 09:49
    •