Dashboard filename path

Hi,
Raspberry pi , dashboard problem

I have some problem with UI , one or two employee can access the UI .they Fills the entire data for each trainee and save it as file.txt
like [name,age,Gender...etc] so, the data of trainee will be different for each one .

How i can create new path with the name of trainee for each one? [file.txt for each trainee]

thanks .

I'm guessing you are using the file out node?

If so look at the info panel for the node which explains how you can send the filename (and path) to the node.

yes I'm using the "file out" node
i looked to it. with some search and get this code to send path for the "file out" and its working fine
but i want this job for the employee they can access the UI and choice the path and name for file from UI . they can not access the function node to edit for the path and name of file

 var d = new Date();
                 payload={"NAME":msg.topic,"DATA":msg.payload};
                 msg.payload=payload;
                 msg.filename="D:/filename /test text file from NodeRed/[name of trainee].txt";
                  return msg;

summery
how i can give this function ,the path and name of trainee from UI.

Notice
"i do not have the full experience with node red "

The data contains the name of the person?

Add a debug node to your dashboard output.

Read the page in the docs about working with messages.

From your post I’d suggest also reading a guide online about javascript objects and arrays

YES,that contains the name .
Capture!
okay i will read it.
thanks for your Suggestion i will .

If they are all separate messages, how are you planning to join them into one message so you can write them to a file?

Could you use a dashboard dropdown node populated with the names of the employees. which would populate msg.filename?

paul-Reed, ukmoose
thank you so much for your attention. the problem was finished using function node with simple code

i =msg.payload.DATA+".txt"; 
msg.filename="D:/filename /test text file from NodeRed/"+i;
return msg;

i'm just a beginner for JavaScript .if you have any suggestion for me just let me know.
i`m always listening ,thanks guys