Set file name from object value

Hello there,

In my case, I would like to use the value "EC_DATE" of my object to name the outgoing file from my flow.

This is my object :

{"EC_NUMERO":"BCUSA4","EC_DATE":"15/04/2024","EC_CODE_JOURNAL":"YG","EC_EXERCICE":54,"LI_COMPTE":6522298,"LI_LIBELLE":"Payroll Expenses","LI_DEBIT":3464.75,"LI_CREDIT":"","LI_DEVISE":"USD","LI_PIECE":"","LI_AFFAIRE":"B000030"}

Thank you for reading :wink:

Assuming that is in msg.payload then simply set the file nodes path field to msg. and enter payload.EC_DATE

Taking advantage of the tools provided in the Debug panel:

There’s a great page in the docs (Working with messages : Node-RED) that will explain how to use the debug panel to find the right path/value for any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

The only things I understand is this to do this :
Capture d’écran 2024-05-16 à 12.53.47

But I already try and it doesn't work :
Capture d’écran 2024-05-16 à 12.53.25

I think I didn't understand what do you wanna tell to me...

You are using an old version of node-red. New version looks like this:
image

Read the built in help for that node - you will see the it permits you to set msg.filename

I think I don't see that cause I use a "corporate version" of Node-RED proposed by my company cause, when I launch Node-RED on my personal computer (v3.1.9) I see that part of the node.

Judging by your other thread, your company version is waaaaay out of date & probably using old End Of Life versions of NodeJS (and I suspect along with all its unfixed critical CVEs waiting to bite :man_shrugging:).

Node-RED V2.X and V3.X offer lots and LOTS of benefits in features and fixes, you might want to nudge the powers that be in your company to catch up?

Or perhaps switch to FlowFuse if they need a professional means of running Node-RED? (shameless plug - I work for FlowFuse)