Dropdown list gets overwritten. Only one item in list

bilde

I'm trying to populate a dropdown with the options propery in the picture.
A change-node gives me a few objects like the one above.

The dropdown gets populated with the msg.options, but only last item is shown. So I guess it overwrites for each object.

I could not make the Join node work for this.

:grey_question:

if you are getting multiple messages with a single option string, you will need to join the options into an array, or save to context storage. The msg.complete in your msg object would probably interfere with the join node, you may want to delete it unless it's there to denote the last msg part for the join. It may help to see a flow that is causing the join issue.

Show us how you have configured the Join node and what you get out of it.

Thanks for reaching out.

I just did a merge and a function node.

msg.options = [msg.payload.options]
for (var i = 0; i < msg.payload.length; i++) {
    msg.options[i] = msg.payload[i].options
}

return msg;

That worked fine. There is propably a way to accomplish this wihtout a function too.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.