Whenever you are analysing a problem work through the flow with debug nodes checking all looks right. You are getting an error from the sql node so put the debug on the output of the function node and check that looks right.
shrickus, I am able to push data to my MSSQL database now.
But the data stored inside MSSQL is not the same with the output.
For example:
output: {'SID':2,'Date':2018/11/18,'Time':21:29:01}
data stored inside MSSQL :
Show us the output of a debug node connected to the output of the function node. As I have said before, if a node is not doing what you expect then first look at what you are feeding into it.
Do you understand what that line of code means? If not then you need to try and understand the basics of javascript. We can't just keep feeding you the code unless you make an effort to understand.
Your SQL syntax is not correct -- your values are strings and need to be inside whichever quotes are expected by the target database. I've not used MSSQL much, but I believe you need single-quotes, so the insert statement should be:
INSERT INTO [SAOS1].[dbo].[attendance1] (SID, Atd_Date, Atd_InTime) VALUES (1, '2018/11/20', '12:33:11')
which is why I put them into the template example above in my last post.
Edit: I just noticed that your list of columns do not have the same order as your list of values -- that will cause the values to be placed into the wrong columns. I've adjusted the columns in the SQL statement above to be correct.
Hi, shrickus. I am able to insert attendance record to MSSQL now without any problem. Thank you for your help!
I would like to send a SMS notification to student's parent, and I am able to get parent phone number from my MSSQL database.
But I have a small problem with sending SMS, the Twilio Node properties only allows me to put one TO phone number. Meaning that all SMS will be received by only one phone number (parent), even not his/her children
According to the node's Info, you can pass in the phone number on the msg.topic field:
Sends an SMS message or makes a call using the Twilio service.
msg.payload can either contain the text of the SMS message, or the URL of the TWiML used to create the call. The node can be configured with the number to send the message to. Alternatively, if the number is left blank, it can be set using msg.topic . If the node is configured to make a call then the TWiML URL must be publically accessible.
But make sure you leave the "To" field blank, or else it will ignore the number passed in through the topic.