locked
Question about custom filter RRS feed

  • Question

  • Hello,

     I have a question related to custom filters and whether I need to use them at all.

    I have a client-server application, clients can 'Propose' data items to the server. On the server, a separate workflow can 'Approve' or 'Reject' items. All clients get the 'Approval' or 'Rejection'.

    Further the server can also filter a subset of items for each client depending on some criteria, however the clients need not be aware of the fact that the items are being filtered. 

    My first thought was that I may need three different filters:

    - On client as source provider, GetChangeBatch sends items with 'Proposed' status

    - On server as source provider , GetChangeBatch sends items with 'Approved' and 'Rejected'

    - On server, GetChangeBatch sends items filtered by some characteristic of the client.

    However, in each case, the destination sync provider does not need to be aware of the filtered items. I think this means that the two sides don't track the same filters. Does this mean that use of the filtering support of Sync framework is not needed in this case?

    Thanks and regards,

    SK

    Monday, August 16, 2010 2:38 AM

Answers

  • You can try the below approach when using the sql sync provider from the recently released 2.1/3.1 Sync Framework.

    1. Please create one sync scope to include all necesary tables (columns).

    2. When doing provisioing, please Creating SqlSyncScopeProvisioning object,

    2.a to apply provisioning on the server side, please set the filter condition to 'Approval' or 'Rejection'.

    2.b to apply provisioning on the client side, please set the filter confition to 'Proposal'.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, September 3, 2010 12:37 AM
    Answerer

All replies

  • will the client have rows other than 'Propose'? same thing with the server, will it have other rows other than 'Approval' and 'Rejection'?

    If not, then you can do away with the first two filters and just send across rows between client and server. just apply a filter for the third one.

    Wednesday, August 18, 2010 1:00 AM
  • Hi June, 
     I'm sorry, I didnt understand the point about rows. The client and server have the data items with different fields (name, type, created by, etc...). the data item also has a field called Status, which can be Proposed, Rejected, Approved etc. The client and server need to consider the items with the rules for Status as I have mentioned 

    Regarding the third rule, my impression was that if the items move in and out of a filter, the client needs to track the filter and thus maintain the filtered knowledge. If however if the items never move out of the filter, is the filter still required?

     

    Thanks,

    SK

    Friday, August 20, 2010 11:13 PM
  • Sync Fx doesnt support items moving out of filter.

    My question is on the client side, will the client update  rows with "Proposed" status to other status values? On the server side, will there be other status than "Approval" and "Rejection"? (.e.g, "Cancelled", "On hold", etc., such that you want to filter them out?)

    Sunday, August 22, 2010 4:08 PM
  • Hi June,

    Yes, the client can change the status, however only Proposed items will be uploaded to the server.

    Server will have many items in Proposed state, and will change status to Approved or Rejected. Only these items will be downloaded to clients.

     

    Thanks,

    Wednesday, August 25, 2010 5:12 PM
  • i stand corrected, you'll have to use filters then.

    Thursday, August 26, 2010 1:16 AM
  • You can try the below approach when using the sql sync provider from the recently released 2.1/3.1 Sync Framework.

    1. Please create one sync scope to include all necesary tables (columns).

    2. When doing provisioing, please Creating SqlSyncScopeProvisioning object,

    2.a to apply provisioning on the server side, please set the filter condition to 'Approval' or 'Rejection'.

    2.b to apply provisioning on the client side, please set the filter confition to 'Proposal'.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, September 3, 2010 12:37 AM
    Answerer