# Payload name - not going through function node

**URL:** <https://discourse.nodered.org/t/payload-name-not-going-through-function-node/63073>\
**Category:** General\
**Created:** [25 May 2022 20:48 UTC](https://discourse.nodered.org/t/payload-name-not-going-through-function-node/63073 "2022-05-25T20:48:41Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 May 2022 22:17 UTC](https://discourse.nodered.org/t/payload-name-not-going-through-function-node/63073/13 "2022-05-26T22:17:49Z")

</div>

If all the data is in the same row you don’t need to create three paths and eventually do a join. You could do the calculation in just one function node.

```auto
let l = msg.payload.col6;
node.warn("col6="+l);

let t = msg.payload.col10;
node.warn("col10="+t);

let h = msg.payload.col11;
node.warn("col11="+h);

let LSVP = (Math.pow(2.71828,(l / (l +238.3) * 17.2694))* 610.78)/1000;
let SVP = (Math.pow(2.71828,(t / (t +238.3) * 17.2694))* 610.78)/1000;
    h = Math.round(h * 100*10)/10;
let DDP = LSVP-(SVP*h/100);

msg.lsvp = LSVP;
msg.svp = SVP;
msg.h = h;

msg.payload=DDP
return msg;

```

send the output of the csv to a `function` node with the above code and send the putput to a `debug` node to see the results.

Here is some reading that might make things clearer

> [@Object vs strings - extract a value from a split](https://discourse.nodered.org/t/object-vs-strings-extract-a-value-from-a-split/42112/2):
>
> You need to understand the differnece (and advantage) of using objects and properties in node-red (and JavaScript in general). For example, if you have an object, there is ZERO need to split strings etc. JSON stands for JavaScript Object Notation - meaning it is a string representation of a JS object - which is useful for transmitting between devices and across the internet (they all do strings right!). That is why JSON is so popular - because it is REALLY EASILY convert to/from object/string…

Canned replies:

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path to 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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

_[View the full topic](https://discourse.nodered.org/t/payload-name-not-going-through-function-node/63073)._
