Date picker -> flow context gives 'undefined'

i'm struggling with setting a date range from UI for building an URL for an API request with it.

while debugging, i reduced it to the bare minimum, or what i think it is:

the date picker is set to 'send to flow.date' and the debug node got the jsonata expression $flowContext('date') in it..

[{"id":"632171e5dee12a3b","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"11d43ec994891a14","type":"ui_date_picker","z":"632171e5dee12a3b","name":"","label":"","group":"c36f05191feca79e","order":6,"width":0,"height":0,"passthru":false,"topic":"date","topicType":"flow","className":"","x":510,"y":80,"wires":[["8ce861aae6ee7719"]]},{"id":"8ce861aae6ee7719","type":"debug","z":"632171e5dee12a3b","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"$flowContext('date')","targetType":"jsonata","statusVal":"","statusType":"auto","x":730,"y":80,"wires":[]},{"id":"c36f05191feca79e","type":"ui_group","name":"test","tab":"15ebcf5.c678631","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"15ebcf5.c678631","type":"ui_tab","name":"Home","icon":"dashboard","order":"1"}]

what am i missing? :roll_eyes:

image

That doesn't do what you think. It sends the date value in msg.payload, and in msg.topic it sends whatever is currently in flow.date.

doh. been away from node red for way too long again it seems.. :smiling_face: thanks.

but question: where's that "memoryOnly" and "database" icon/dropdown in your screenshot coming from?

https://nodered.org/docs/user-guide/context

The multiple context stores are defined in settings.js which exists in the .node-red folder

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