Calculating with several if loops

Hi

I have a dashboard with 3 options, when 1 is chosen there must be made a calculation.
This choice is a string, but how can I say: if the string is equal with the other.
Like in this case I choosed 3 x 230 in a normal case it must be the calculation on line 7.
But the result is 'undefined'


image

What is the first line supposed to be doing? Getting a value from global context?

for that, you use global.get

chrome_SMvjOsYhTs

PS This autocompletion feature :point_up: is part of the monaco editor (you can get this in newer versions of node-red by setting the code editor setting in settings.js)

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