Overall Data Display

Hi,

I tried to display the data from the database in table. The following is the flow:

[{"id":"6e94e3b6.53c1ec","type":"mui_template","z":"ada4ecf1.32178","group":"119d1a72.024226","name":"","order":2,"width":"30","height":"3","format":"<style>\n    td { text-align: center; }\n    td * { display: inline; }\n</style>\n\n<table border=\"2\" width=\"100%\" height=\"100%\">\n\t<tr>\n\t\t<th>ID</th>\n\t\t<th>Code</th>\n\t\t<th>Description</th>\n\t\t<th>Location</th>\n\t\t<th>Type</th>\n\t\t<th>Owner</th>\n\t\t<th>IP Address/Port</th>\n\t\t<th>Port</th>\n\t\t<th>Process Code</th>\n\t</tr>\n\n\t<tr ng-repeat=\"x in msg.payload | limitTo:100\">\n        <td>{{$index}}</td>\n\t\t<td>{{msg.payload[$index].name}}</td>\n\t\t<td>{{msg.payload[$index].description}}</td>\n\t\t<td>{{msg.payload[$index].location}}</td>\n\t\t<td>{{msg.payload[$index].type}}</td>\n\t\t<td>{{msg.payload[$index].owner_id}}</td>\n\t\t<td>{{msg.payload[$index].ip_address}}</td>\n\t\t<td>{{msg.payload[$index].ip_port}}</td>\n\t\t<td>{{msg.payload[$index].process_code}}</td>\n\t</tr>\n</table>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":780,"y":80,"wires":[[]]},{"id":"e9894158.47f85","type":"debug","z":"ada4ecf1.32178","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":670,"y":160,"wires":[]},{"id":"e5a864e2.67a728","type":"mysql","z":"ada4ecf1.32178","mydb":"272ea16.4569d5e","name":"database","x":540,"y":80,"wires":[["6e94e3b6.53c1ec","e9894158.47f85"]]},{"id":"97f4379b.97bcd8","type":"function","z":"ada4ecf1.32178","name":"select-query","func":"msg.topic=\"SELECT name,description,location,type,owner_id,ip_address,ip_port,process_code FROM machine2 WHERE name='\" + msg.payload + \"'\";  \nreturn msg;","outputs":1,"noerr":0,"x":430,"y":160,"wires":[["e5a864e2.67a728"]]},{"id":"22958033.b43cb","type":"mui_text_input","z":"ada4ecf1.32178","name":"name","label":"Search Machine","group":"119d1a72.024226","order":1,"width":"5","height":"1","passthru":true,"mode":"text","delay":300,"topic":"name","x":130,"y":160,"wires":[["a8bc7de7.67385"]]},{"id":"a8bc7de7.67385","type":"msg-resend","z":"ada4ecf1.32178","interval":5,"intervalUnit":"secs","maximum":"1000000","bytopic":false,"clone":true,"firstDelayed":false,"addCounters":false,"highRate":true,"outputCountField":"","outputMaxField":"","name":"","x":270,"y":160,"wires":[["97f4379b.97bcd8"]]},{"id":"d06faf57.95ca6","type":"inject","z":"ada4ecf1.32178","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":80,"wires":[["2f371afa.933966"]]},{"id":"2f371afa.933966","type":"function","z":"ada4ecf1.32178","name":"select-query","func":"msg.topic=\"SELECT name,description,location,type,owner_id,ip_address,ip_port,process_code FROM machine2 order by id desc limit 1\";  \nreturn msg;","outputs":1,"noerr":0,"x":330,"y":80,"wires":[["e5a864e2.67a728"]]},{"id":"119d1a72.024226","type":"mui_group","z":"","name":"mGroup 3","tab":"c6b47aa.71d9788","order":3,"disp":false,"width":"30","collapse":false},{"id":"272ea16.4569d5e","type":"MySQLdatabase","z":"","host":"10.21.11.15","port":"3306","db":"i4inari","tz":""},{"id":"c6b47aa.71d9788","type":"mui_tab","z":"","name":"I4Inari","icon":"home","order":1}]

Thanks for helping.

Show us what you see in the debug node.

Is that flow working for you or do you have a question?

If it isn't working then please provide some description of what you are getting and what you expect.

This is what I can see in the debug node:

image

The flow should be able to show the data in table. The table not displaying the data except for the data that I searched using the Search Machine text input.

Is the display showing the data that is in the debug node?

Colin

Yes. That is the display that showing the data.

So what is the problem? You are successfully displaying the data that your query fetches.

I want the data to be shown in ui page table. It's only displaying the data on the msg.payload debug.

Sorry, I can't help as you seem not to be using the standard dashboard, so I can't look at your flow.

It's alright, Colin. I'm actually using the node-red-contrib-mdashboard. It's the same, but the difference is this is for multiple users.

It’s not the same. Be careful when you say it supports multiple-users as there is still only one flow running behind it so all users are still updating the same variables just the ui won’t show them that. Personally I call that dangerous as I may turn something off then unknown to me someone turns it back on again.