Hi All,
I am having the following code, i have a ID called abc.id and it contains, values as 001,002 and now,
there is another CDT called def where i need to save the values of def.abcid as 001 and 002,
when i am trying to do it like this,,
a!save(ri!def.abcid,ri!abc.id) when i do this, i am only getting it as 001. for the 2 values which i have that is,
{
def.id:001
def.name:Abc
def.abcid:001
def.lastupdatedby:now()
def.lastupdateddate:loggedInUser()
},
}
Ideally i need the second set updated with def.abcid:002
How can i do this on a!save()
Discussion posts and replies are publicly visible
Try something like this... FIrst create a rule with 2 inputs, abcId and def...rule!BuildDefCDT = {id = ri!def.id, name=ri!def.name, abcid = ri!abcid, lastupdatedby= loggedinuser, lastupdateddate = now()}, then call it in the a!save using an apply or a forEach depending on your version of Appian: a!save(ri!def, apply(rule!BuildDefCDT(abcId: _, def: _), merge(ri!abc.id, ri!def))... There is also a custom plugin for updating CDTs that could be used in a looping function as well.