I am using node-red-node-mysql to insert a row into a table in a database.
The function looks like this and works perfectly:
msg.payload = [msg.customerNumber, msg.orderNumber, msg.orderDate, msg.firstName]
msg.topic = "INSERT INTO orderTable(customerNumber, orderNumber, orderDate, firstName) VALUES(?, ?, ?, ?);"
return msg;
What I want to do is to format firstName before inserting it into the table.
If msg.firstName's value is martin I want to insert Martin.
If the value is mARTIn I also want to insert Martin.
How can I use UCASE/LCASE functions inside this function?