CDT

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't exist in appian anymore that i need to delete using delete datastore smartsvc

CDTC would contain the ones with doc ids that exist that i need to update using write to datastore smart svc

in simple terms, CDTC = CDTA (all records) - CDTB (bad records)

How can that be accomplished without having to loop twice ?

I am using following to filter out the bad records (CDTB)

a!localvariables(

local!data : ri!docsdata,

local!docstodelete: a!foreach(

items: local!data,

expression : if(isobjectexists("Document", fv!item.Doc_id), fv!item, {}

),

local!docstodelete.data

)

)

Then i tried using difference(CDTA,CDTB) but that doesn't work .. ;-(

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data