Is it possible to update a list of CDT with a specific value by index?

Certified Senior Developer

Hi all,

I want to replace each "trackerID" from local!test - local!test4 variables with a correct trackerId from local!Ids. Current values in dummyCDT are indexes of their corresponding IDs in local!Ids array.

local!Ids values are {24912; 24913; 24914} 

a!localVariables(
  local!test: 'type!{urn:com:appian:types:DBS}DBS_Tracker'(trackerID: 1),
  local!test2: 'type!{urn:com:appian:types:DBS}DBS_Tracker'(trackerID: 2),
  local!test3: 'type!{urn:com:appian:types:DBS}DBS_Tracker'(trackerID: 2),
  local!test4: 'type!{urn:com:appian:types:DBS}DBS_Tracker'(trackerID: 3),
  local!dummyCDT: union(union(local!test, local!test2), union(local!test3 ,local!test4)),
  local!Ids: index(ri!tracker, "trackerID", null),

  a!update(
    data: local!dummyCDT,
    index: "trackerID",
    value: index(
      local!Ids,
      local!dummyCDT.trackerID,
      null
    )
  ),

)

Is it possible to achievable this way?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data