node-red-contrib-ui-time-scheduler icon indicating copy to clipboard operation
node-red-contrib-ui-time-scheduler copied to clipboard

[FR] Event Options: Data Types

Open Sineos opened this issue 4 years ago • 4 comments

Me again 😇 It would be great if one can pass the data type on the event values. Currently only string is supported.

grafik

Again, many thanks 😃

Sineos avatar Aug 13 '21 21:08 Sineos

Hi,

yes the input field just takes a string value, but the node does check the value before it saves new timers - it will either remain a string, or gets converted to a number or boolean value. Are you missing anything specific?

Edit: Did a quick code review, seems that there is an issue with converting zero. I am gonna take a look at that later today. Edit2: v1.15.2 now fixes the conversion of "0" to zero.

fellinga avatar Aug 14 '21 07:08 fellinga

I have two use cases where I would need boolean in one and a flow-context variable in the other. Of course, it is all about "user comfort" since you can work around this with switch / change nodes. Also it is a bit my style to make sure in my flows to use the data types as they are meant to be and not the "universal" javascript string.

Maybe more or less "borrowing" the block from the injection node? grafik

Sineos avatar Aug 14 '21 11:08 Sineos

Well user comfort is also to enter something, without thinking about data types at all, and still get the correct data type.

So the thing that is currently missing for you would be to send "flow." or "global." variables?

fellinga avatar Aug 14 '21 13:08 fellinga

I would appreciate following types:

  • string
  • number
  • boolean
  • flow.
  • global.

Thanks 😃

Sineos avatar Aug 14 '21 14:08 Sineos