Msg split, choose option and MySQL select

Have you done that yet?

yep Colin, got a slightly different error msg but that is:

18 Feb 12:27:59 - [error] [function:reformat] Function tried to send a message of type string

My guess is that you did something like this in your function

var x = "foo"
msg = x
return msg

which would set msg as a string, but it must be an object.

of course the fact you haven't shown what you are doing, this is only a guess.

I am sending the following string to a mysql db:

"msg.topic : the query is not defined as a string"

18-2-2020 12:39:52node: ffb21a77.04b158msg.payload : string[339]

"INSERT INTO FHIR2020.PISS (_ID, _VOORNAAM, _ROEPNAAM, _ACHTERNAAM, _PARTNERNAAM, _STRAATNAAM, _HUISNUMMER, _POSTCODE, _WOONPLAATS, _TELEFOONNUMMER, _DIGID, _KLINISCHNUMMER, _POLIKLINISCHNUMMER, _EXTRA, _EXTRA2) VALUES (959993,'GRADUS','GER','BUURMAN','','KLAAS KATERSTRAAT','41','3122KL','SCHIEDAM','0629233911','09103781','1','1','', '');"

Does that bit on the end look right to you?
Every time you post the query it is different. If you stuck with one case and got it working instead of continually changing everything then it would be much easier.

I complete rearrange the config. It is now steady. Originally it would receive a msg from a soapserver, reformat the message and execute the necessary sql statement. For the moment I am concentrating on splitting, checking and sending the message to mysql.

The original msg is:
["SingleInsert","insert into fhir2020.piss (_id, _voornaam, _roepnaam, _achternaam, _partnernaam, _straatnaam, _huisnummer, _postcode, _woonplaats, _telefoonnummer, _digid, _klinischnummer, _poliklinischnummer, _extra, _extra2) VALUES (959993,'Gradus','Ger','Buurman','','Klaas Katerstraat','41','3122KL','Schiedam','0629233911','09103781','1','1','', '');"] and is put in by a inject (the soapserver wille be next)

The flow looks like:

Sorry for the inconvenience Colin. I leave it as is.

Please find one of your mysql nodes and click on it.
In the sidebar - click the info tab
read what it says

Now that you have done that, where should the sql query be in the msg object?

Sorry but info tab. Must I double click or single click

found it but no special information related to the msg

this is the msg in the debug mode FROM NODE MYSQL;

msg : string[48]

"msg.topic : the query is not defined as a string"

Where does it say to place the query?

at the mysql node itself.

can you past a photo of where is says that? Because when I read the info tab it tells me where to put the query. Maybe we are looking at differrent nodes.

image

See the text in the info box

Hoi Ger, ivm de informatie in die query, voor de veiligheid misschien de verdere info verbergen of onleesbaar maken voor de screenshot. Informatie over digid of poliklinische nummers lijken mij niet verantwoord op een publiek forum.
M.v.g,
Lena

dat is allemaal geanonimiseerd maar dank voor de tip

Ger

I must not have been clear when I said go look at the info tab of the node in the sidebar. This is what I was refering to:
Screen Shot 2020-02-18 at 7.49.50 AM

So what does that say about where the query should be?