ioan
9 years agoRoku Guru
Passing an array through interface field?
I have this array, a = [{id: 1, checked: false}, {id: 2, checked: true}] and I want to pass it to a task. I tried declaring the interface
<field id = "checkedlist" type = "array" /> or <field id = "checkedlist" type = "assocarray" />
but when I try to assign the a to it, it doesn't work. Here is what I tried:
I also tried m.save.checkedlist.Append(a) and to push each element separately, but I always get error. What's the right way to do this?
<field id = "checkedlist" type = "array" /> or <field id = "checkedlist" type = "assocarray" />
but when I try to assign the a to it, it doesn't work. Here is what I tried:
m.save = createObject("roSGNode", "ConfigTask")
m.save.checkedlist = a
m.save.isarray = true
m.save.isdone = false
m.save.observeField("isdone", "closeThis")
m.save.control = "RUN"I also tried m.save.checkedlist.Append(a) and to push each element separately, but I always get error. What's the right way to do this?