# 2 different flow show same result

**URL:** <https://discourse.nodered.org/t/2-different-flow-show-same-result/52888>\
**Category:** General\
**Created:** [28 October 2021 14:38 UTC](https://discourse.nodered.org/t/2-different-flow-show-same-result/52888 "2021-10-28T14:38:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smile](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@smile](https://discourse.nodered.org/u/smile)\
**Post date:** [28 October 2021 14:38 UTC](https://discourse.nodered.org/t/2-different-flow-show-same-result/52888/1 "2021-10-28T14:38:04Z")

</div>

Why these 2 different flow show same result in Price sensor. I think data is same in both function nodes "get count on reset" ; but i don't know how flow working and what i need to change (`"ycount")` or `(msg.reset === 0)` I am a new in NodeRed. Please help me.

> **[Consumption price - Pastebin.com](https://pastebin.com/hXrvqE0Z)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

```auto
// Grab the last saved total count:
msg.ycount = flow.get("ycount")||0;
// If the count just reset, display the old total:
if (msg.reset === 0) return msg;
// otherwise just update the new saved value,
else {
 flow.set("ycount", msg.payload);
 // and end the program:
 return null;
}

```

![Screen Shot 2021-10-28 at 16.13.05](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/f/ff9cb13562a1a95a0456b340b2e506f8912c04f4.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 December 2021 14:38 UTC](https://discourse.nodered.org/t/2-different-flow-show-same-result/52888/2 "2021-12-27T14:38:12Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
