i need to append the dictionary in the left pic with the list of text strings mentioned in the right pic. First dictionary should have title:task Name appended after id and 2nd dictionary should have title:Due Date after id. once when first 7 in the dictionary is appended with the values from list of text strings, the 8the value in dictionary should start to append from 1st again in the right pic. i tried looping using foreach but it never worked. Any help would be appreciated.
Discussion posts and replies are publicly visible
First thing to do is include the Dictionary manipulation plugin functions https://community.appian.com/b/appmarket/posts/cdt-manipulation you can do this from the admin console on your site. Then you'll still each a forEach loop
a!localVariables( local!dictionaryList: { { displayValue: "hello", id: 1 }, { displayValue: "world", id: 2 }, { displayValue: "earth", id: 3 } }, local!titles: { "titleOne", "titleTwo", "titleThree" }, a!foreach( local!dictionaryList, updateDictionary( fv!item, { title: index(local!titles, fv!index, null) } ) ) )
If you don't want to use the dictionary plugins (But you should) then you can also recreate the dictionary in the forEach