Hey all,
I’m currently trying to save values from an array into a specific field in an array of CDTs. The CDT has fields of name and id. The ids are currently coming from an a multipleDropdownField and are being saved in an array as the choices are being selected.
For example
When the first choice is selected the array is local!ids: {1)
After the second choice the array is {1,2}
After the third choice the array is {1,2,3} and this can go on
My goal is to have {{name: “”, id: 1}, {name: “”, id: 2}, {name: “”, id: 3}} but what I’m getting is {{name: “”, id: 1}, {name: “”, id: 1}, {name: “”, id: 1}}
Or have cdt.id = {1,2,3} but I’m getting cdt.id = {1,1,1}
Does anyone have any idea how to solve this issue?
Discussion posts and replies are publicly visible