Table only shows 1st entry

I'm using a table node to display information per device. The information comes in async and I add it to the array of objects then send to the table. The flow is below. The table will only display the 1st entry.

[{"id":"592c7363.cac7bc","type":"tab","label":"Remote Manager","disabled":false,"info":""},{"id":"9161c566.8fa468","type":"switch","z":"592c7363.cac7bc","name":"Beacon messages","property":"type","propertyType":"msg","rules":[{"t":"eq","v":"Mtype_Beacon_Msg_unAssigned","vt":"global"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":140,"wires":[["5dbf41e0.07f578"]]},{"id":"aff73007.c147b","type":"link in","z":"592c7363.cac7bc","name":"","links":["e4f2e4f1.d2d76"],"x":215,"y":140,"wires":[["9161c566.8fa468"]]},{"id":"e7cf42ae.907a08","type":"comment","z":"592c7363.cac7bc","name":"Unassigned Beacons","info":"","x":500,"y":80,"wires":[]},{"id":"76c771fc.49e988","type":"buffer-parser","z":"592c7363.cac7bc","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint8","name":"DevType","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"state","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"biguint64le","name":"UNI","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":790,"y":140,"wires":[["49a6b83d.fe947","52954531.d20804"]]},{"id":"49a6b83d.fe947","type":"function","z":"592c7363.cac7bc","name":"","func":" \n\nvar remotes=flow.get(\"remotes\") || []\n var DevTypes = global.get(\"DevTypes\")\n \n var temp ={}\n \n var i,length\n\n var found = false\n \n length = remotes.length\n \n for (i = 0; i < length; i++)\n {\n     if (msg.payload[2].toString(16) == remotes[i].UNI)\n     {\n         found=true\n         break;\n     }\n }\n \n if (found == false)//add new remote\n {\n    \n     temp.DevType = DevTypes[msg.payload[0]]\n \n     if (msg.payload[1] & 0x80)\n    {\n        temp.state=\"Reset\"\n    }\n    else\n    {\n        temp.state= \"Normal\"\n    }\n \n \n    temp.UNI = msg.payload[2].toString(16)\n    remotes[i]=temp\n    node.warn(remotes)\n    flow.set(\"remotes\",remotes)\n    msg.payload = remotes\n    return msg;\n}","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is started.\n\nflow.set(\"remotes\",null)","finalize":"","libs":[],"x":1000,"y":140,"wires":[["c4f802ef.ec8f48","52954531.d20804"]]},{"id":"5dbf41e0.07f578","type":"buffer-maker","z":"592c7363.cac7bc","name":"","specification":"spec","specificationType":"ui","items":[{"name":"item1","type":"uint8","length":17,"dataType":"msg","data":"payload"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":610,"y":140,"wires":[["76c771fc.49e988"]]},{"id":"c4f802ef.ec8f48","type":"ui_table","z":"592c7363.cac7bc","group":"5513dab1bcfcbacb","name":"","order":1,"width":9,"height":12,"columns":[{"field":"DevType","title":"DevType","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"state","title":"State","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"UNI","title":"UNI","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":1230,"y":140,"wires":[]},{"id":"38a92c0d.39304c","type":"inject","z":"592c7363.cac7bc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":670,"y":60,"wires":[["5c3475df.e9976c"]]},{"id":"5c3475df.e9976c","type":"function","z":"592c7363.cac7bc","name":"","func":"msg.payload=[]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":60,"wires":[["c4f802ef.ec8f48"]]},{"id":"52954531.d20804","type":"debug","z":"592c7363.cac7bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1190,"y":220,"wires":[]},{"id":"5513dab1bcfcbacb","type":"ui_group","name":"Unassigned Remotes","tab":"8bad4a75.48931","order":1,"disp":true,"width":9,"collapse":false,"className":""},{"id":"8bad4a75.48931","type":"ui_tab","name":"Remotes Manager","icon":"dashboard","disabled":false,"hidden":false}]type or paste code here

Something very similar to this works fine in another flow. What am I missing?
Thanks

I found a work around by adding back to back CVS nodes between the function and table nodes. The debug nodes shows the payload looks just like the original so I don't know why it works now.

In the original flow, did you try disconnecting the other function node in case something is coming down there?

That node just clears the table when the flow is restarted. Normally no data from it but I did try disconnecting it with no improvement.

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