# Dashboard filename path

**URL:** <https://discourse.nodered.org/t/dashboard-filename-path/15111>\
**Category:** General\
**Created:** [4 September 2019 14:34 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111 "2019-09-04T14:34:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_elkomya](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Ahmed\_elkomya](https://discourse.nodered.org/u/Ahmed_elkomya)\
**Post date:** [4 September 2019 14:34 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/1 "2019-09-04T14:34:51Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 September 2019 14:38 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/2 "2019-09-04T14:38:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ahmed\_elkomya](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Ahmed\_elkomya](https://discourse.nodered.org/u/Ahmed_elkomya)\
**Post date:** [4 September 2019 15:06 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/3 "2019-09-04T15:06:14Z")

</div>

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

```auto
 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 "

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 September 2019 15:13 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/4 "2019-09-04T15:13:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ahmed\_elkomya](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Ahmed\_elkomya](https://discourse.nodered.org/u/Ahmed_elkomya)\
**Post date:** [4 September 2019 15:22 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/5 "2019-09-04T15:22:54Z")

</div>

> [@ukmoose](#):
>
> data

YES,that contains the name .  
 ![Capture!](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/ae629eebc515ba8e63e4d68e3203d2051450edb0.png)  
okay i will read it.  
thanks for your Suggestion i will .

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 September 2019 17:52 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/6 "2019-09-04T17:52:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ahmed\_elkomya](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Ahmed\_elkomya](https://discourse.nodered.org/u/Ahmed_elkomya)\
**Post date:** [4 September 2019 20:26 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/7 "2019-09-04T20:26:05Z")

</div>

![Capture!!](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/69d7abaa05bb0d8f4dad84cf392f13378e473f22.png)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [4 September 2019 20:48 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/8 "2019-09-04T20:48:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ahmed\_elkomya](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Ahmed\_elkomya](https://discourse.nodered.org/u/Ahmed_elkomya)\
**Post date:** [5 September 2019 00:22 UTC](https://discourse.nodered.org/t/dashboard-filename-path/15111/9 "2019-09-05T00:22:34Z")

</div>

> [@Paul-Reed](#):
>
> `dropdown`

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

```auto
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
