Using mustache variables in MSSQL node

SQL node says I can use moustache format, but I can't figure out why I can't set a SQL variable from a msg. variable. See my example flow:
[{"id":"c38ee7de.9bcf38","type":"MSSQL","z":"a02264a3.bc4628","mssqlCN":"29537ce.b674c84","name":"SQL Query","query":"--Use External Variable for Query--\nDECLARE @group nvarchar(30);\nSET @group = {{{msg.team}}} ;\n\n SELECT groupName AS Result\n FROM TestTable\n WHERE groupName LIKE @group\n","outField":"payload","x":550,"y":900,"wires":[["1cced548.cc9ccb","bc3a7a2f.31dee8"]]},{"id":"1cced548.cc9ccb","type":"function","z":"a02264a3.bc4628","name":"Read Query","func":"msg.result = {};\n\nmsg.result['Team'] = msg.payload[0].Result;\n\nreturn msg;","outputs":1,"noerr":0,"x":770,"y":900,"wires":[["1bb34f54.da0021"]]},{"id":"c2d57dfb.6771d","type":"function","z":"a02264a3.bc4628","name":"Set SQL Variable","func":"\nmsg.team = 'Team';\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":900,"wires":[["c38ee7de.9bcf38","61ecd924.999e18"]]},{"id":"61ecd924.999e18","type":"debug","z":"a02264a3.bc4628","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":820,"wires":[]},{"id":"1bb34f54.da0021","type":"debug","z":"a02264a3.bc4628","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":870,"y":820,"wires":[]},{"id":"5a467a04.370bf4","type":"inject","z":"a02264a3.bc4628","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":900,"wires":[["c2d57dfb.6771d"]]},{"id":"bc3a7a2f.31dee8","type":"debug","z":"a02264a3.bc4628","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":650,"y":820,"wires":[]},{"id":"29537ce.b674c84","type":"MSSQL-CN","z":"","name":"blah","server":"blah","encyption":true,"database":""}]

use {{{team}}} not {{{msg.team}}}

NOTE: I am using the node-red-contrib-mssql-plus. there are a number of bug fixes and improvements over the original. YMMV

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