<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CDT</title><link>https://community.appian.com/discussions/f/rules/20157/cdt</link><description>I have a CDT (say CDTA) which contains a field for doc id that represents document in appian. 
 CDTB would contain the bad doc ids doesn&amp;#39;t exist in appian anymore that i need to delete using delete datastore smartsvc 
 CDTC would contain the ones with</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: CDT</title><link>https://community.appian.com/thread/78750?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2021 21:45:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:091d13e5-303b-4c3b-9d7f-ad78afafb7bb</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Are you using difference() at the field level?&amp;nbsp; If I&amp;#39;m understanding correctly, you have CDTA as an input which contains all documents, you are building CDTB based on docIds in CDTA that do not exist, and you want to build CDTC based on document IDs in CDTA that DO exist.&amp;nbsp; That should be achievable with difference():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!CDTA: {
    {docId: 11},
    {docId: 22},
    {docId: 33},
    {docId: 44},
    {docId: 55},
    {docId: 66}
  },
  local!CDTB: {
    {docId: 33},
    {docId: 44}
  },
  
  difference(
    local!CDTA.docId,
    local!CDTB.docId
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CDT</title><link>https://community.appian.com/thread/78749?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2021 18:53:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:683a777b-f1c7-472c-be3d-420346462468</guid><dc:creator>martincamacho</dc:creator><description>&lt;p&gt;you could use a wherecontains based on the the doc ID and then a revome to obtain only the good records.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>