Page 1 of 1

Sync Only Completed Cases

Posted: October 28th, 2023, 8:31 pm
by diabate
Hi all,
I would like to know if there is a way using syncdata logic to sync only completed cases or cases that fit certains criterias.
I have tried to use universe but it is geometric and related only to the case ID.
Can someone help me?

Re: Sync Only Completed Cases

Posted: October 30th, 2023, 10:27 am
by justinlakier
Hi,

Syncdata can only separate cases within a dictionary based on the ID universe. To make sure that you are syncing only completed cases or cases that fit certain other criteria, you can run a For loop over the dictionary beforehand which finds all cases that match your criteria. You could potentially sync them in the loop using their ID as a universe, however running syncdata for each case separately would be very inefficient. Instead, I recommend having the For loop send all correct cases to a new dictionary that will have only cases matching the criteria, and then syncing this dictionary.

Hope this helps,
Justin