2 different flow show same result

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.

// 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

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