Hello all,I am currently trying to display my MSSQL data in a table displaying in the dashboard of Node-RED.I have attached 3 screen shots showing my current code of the HTML table, the function node and my HTML table in the ui.I am getting an error stating there is no such column as "Status", I have tried changing the way I write the function node (by swapping around the entries, such as putting timestamp infront of status etc) and it always shows an error for the last entry in the function node.I think I know where I am going wrong. I haven't entered my MSSQL database anywhere in the function node, but I have linked it up to the sqldbs node which has my details in?I also know that I need to say which table I am taking the data from, the table is dbo.NodeRedData, but when I tried the code:"msg.topic = "INSERT INTO tr (id, Topic, JobType, Information, Timestamp, Status) VALUES FROM dbo.NodeRedData (id, Topic, JobType, Information, Timestamp, Status)";return msg;"
Hi, you should be using the SQL "SELECT" statement to get information from your database.
"INSERT INTO tr (id, Topic, JobType, Information, Timestamp, Status)is trying to insert data into table tr, which is why you are getting an error as it doesn't exist.Just try: SELECT * FROM dbo.NodeRedData and feed it to a debug node to see if it works.Garry
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/c5d21824-408f-4038-b3dc-75d07790cfe2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<table>
{{#payload}}
<tr>
<td>{{{col1}}}</td>
<td>{{{col2}}}</td>
<td>{{{col3}}}</td>
</tr>
{{/payload}}
</table>
<div ng-bind-html="msg.payload"></div>
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/65c640a0-bd5a-462d-90be-c1fd45f2c7d0%40googlegroups.com.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/d7ee7fd6-e58f-4dfc-8d76-9206b9e93aec%40googlegroups.com.
On Mar 23, 2018, at 7:07 AM, 'Liam Broughton' via Node-RED <node...@googlegroups.com> wrote:Hi Paul,Here is my Node-RED flow.
-Liam.--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/ec5aae2e-61e8-4fcb-a959-ca12f60aa86c%40googlegroups.com.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/81985ada-e20f-40bb-b7d5-b1135a9e695f%40googlegroups.com.
<NO HTML TABLE SHOWING.png>
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/e45f268a-420b-4e74-a9dd-8866a714b402%40googlegroups.com.
<DEBUG.png><HTML CODE.png>
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/c198a8d6-4374-4b51-8b81-342974d5bb40%40googlegroups.com.
Here is another thing to try. Import this flow (a single inject node) to the spreadsheet flow. Then attach it to the input of the ’template’ node (not the ‘ui_template’). Deploy, press the inject and see what the output of the template node looks like.This is data from the testing I set up.
On Mar 23, 2018, at 11:10 AM, 'Liam Broughton' via Node-RED <node...@googlegroups.com> wrote:
I will try this shortly.I am currently updating my nodejs and node-red.Thanks,-Liam.--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/c198a8d6-4374-4b51-8b81-342974d5bb40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/B6603251-32C5-40FC-917A-5F772D4560C9%40zenofmud.org.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/30de9e45-69fd-4922-b21f-d70ab2b6628f%40googlegroups.com.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/30de9e45-69fd-4922-b21f-d70ab2b6628f%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/B6603251-32C5-40FC-917A-5F772D4560C9%40zenofmud.org.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/72d0a2e0-ced4-4da6-800e-a820eb679240%40googlegroups.com.
<DATA SHOWING IN DASHBOARD.png>
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/43413b37-6530-4090-a7ca-81863582f6a3%40googlegroups.com.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/da433b3f-868e-4286-a6b8-ad2b3cbbf163%40googlegroups.com.
{"payload":[[{"id":92,"Topic":"Job ","JobType":"TEST ","Information":"TESTING OVER THE INTERNET ","Status":"In Progress ","Timestamp":"2018-03-20T14:58:13.567Z"},{"id":93,"Topic":"Job ","JobType":"Liam ","Information":"This is a test from mobile app. ","Status":"Not Completed ","Timestamp":"2018-03-21T08:51:23.973Z"},{"id":94,"Topic":"Job ","JobType":"Update test ","Information":"Test ","Status":"Not Completed ","Timestamp":"2018-03-21T09:40:15.963Z"},{"id":96,"Topic":"Job ","JobType":"TEST ","Information":"TESTINFO ","Status":"Not Completed ","Timestamp":"2018-03-22T09:26:05.510Z"},{"id":95,"Topic":"Job ","JobType":"Bob ","Information":"Go upstairs ","Status":"Not Completed ","Timestamp":"2018-03-21T16:25:09.640Z"}],[{"id":92,"Topic":"Job ","JobType":"TEST ","Information":"TESTING OVER THE INTERNET ","Status":"In Progress ","Timestamp":"2018-03-20T14:58:13.567Z"},{"id":93,"Topic":"Job ","JobType":"Liam ","Information":"This is a test from mobile app. ","Status":"Not Completed ","Timestamp":"2018-03-21T08:51:23.973Z"},{"id":94,"Topic":"Job ","JobType":"Update test ","Information":"Test ","Status":"Not Completed ","Timestamp":"2018-03-21T09:40:15.963Z"},{"id":96,"Topic":"Job ","JobType":"TEST ","Information":"TESTINFO ","Status":"Not Completed ","Timestamp":"2018-03-22T09:26:05.510Z"},{"id":95,"Topic":"Job ","JobType":"Bob ","Information":"Go upstairs ","Status":"Not Completed ","Timestamp":"2018-03-21T16:25:09.640Z"}]],"topic":"SELECT id, Topic, JobType, Information, Status, Timestamp FROM dbo.NodeRedData","socketid":"qdSWJBgHNz8GMby7AABT","_msgid":"9ecb2d03.f0f57"}
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/21b95de7-88bb-4687-b8cb-129664c85fa5%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/B92F165A-360A-435F-B944-4CAE226D731B%40zenofmud.org.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/f478b746-829a-4c36-9930-949f9bd05e62%40googlegroups.com.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/612a9905-bd99-466f-bc29-5f9b9c6d4bc4%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/6CCC47FA-A626-42CE-9EEA-981EEC377BF7%40zenofmud.org.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/6CCC47FA-A626-42CE-9EEA-981EEC377BF7%40zenofmud.org.
The returned data will be stored in msg.payload and it will contains two array.
You should just need to access the first object of the array to retrieve data returned from the database query.
So for example, you might create a function node that flows into your sqldbs node with code like this to find if the user exists in the table (please make a special note to "as count". It will serve as the key of the return to retrieve the data. However, if you use "select * from user", the column name will serve as the key name):
msg.topic = "select count(*) as count from user where username = '" + msg.payload.username + "'";return msg;
Then, you can use a switch function after sqldbs node to check if the user exist:
if msg.payload[0][0].count > 0if msg.payload[0][0].count <= 0So it seems that the node is supposed to provide two arrays in the debug tab..I will look into this more Tuesday next week as I am about to finish work for the day.I hope you have a nice Easter.Speak soon,-Liam.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/3d61dbd7-2a46-4945-b2c7-1e1daf6db6fd%40googlegroups.com.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/aad8547c-5b24-4aa5-8757-9902e0a18784%40googlegroups.com.
On Apr 4, 2018, at 7:46 AM, 'Liam Broughton' via Node-RED <node...@googlegroups.com> wrote:
Just tried this and nothing displays on the dashboard page again.-Liam.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/0aa519c5-3fc0-4e18-a2ff-45f38cd1de5e%40googlegroups.com.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/fc894648-5754-415d-ab62-3e65213b48bb%40googlegroups.com.
<debug tab.png>
<table> <tr> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> </table>
-Liam.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/36335f3f-27c6-4258-9f34-9f5b2175b338%40googlegroups.com.
15 AM, 'Liam Broughton' via Node-RED <node...@googlegroups.com> wrote:
I have attached a screenshot of what I have entered in my change node.-Liam.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/25d3034f-9f06-4e12-a8c4-6dabd8fe3e14%40googlegroups.com.
<change node.png>
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/4388115d-df9f-45fc-b9fd-d890f590e8f3%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/4388115d-df9f-45fc-b9fd-d890f590e8f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/3804F5BB-5D8D-442F-874E-E25D837EB1E2%40zenofmud.org.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAL%3D0gLsNW2LpOXQx84FNa87SJGQbnadydf0JLtog%2Bk8ng5MyXQ%40mail.gmail.com.
On Apr 4, 2018, at 11:08 AM, 'Liam Broughton' via Node-RED <node...@googlegroups.com> wrote:Thanks Paul!!!!It is now displaying the data!!What did changing the "change node" actually do then?
The only thing now is that there are no headers on my table, and the data is being displayed in random orders.
Is there a way that I can implement a "filter" so I can arrange the id part of the table to be in order from highest to lowest?
-Liam.--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/9e41bf16-d274-4c94-b269-96e12dd82d3f%40googlegroups.com.