Hi all!
I need to use a function to prompt for a film name the send that to a payload in order to obtain the result and work with that result later.
I'm getting only wrong result. So far i have this.
var filmName = '';
msg.payload = filmName;
return msg;
Thanks in advance!
Regards
Flows run without user intervention so you cannot prompt a user for a value in a flow as it doesn't make sense.
What you need to do is create a UI for user input and incorporate that into your flow. Dashboard is the simplest approach to do this.
Hi!.
Yeah, you're right about make a user input with the dashboard. But i think that it also can be managed within a function node because there you can write the question and capture the answer, for example, "how old are you?".
I mean, if I do it the same way as i write on a JS script so it can be done here.
Regards.
No - flows do not interact with the user - that is the job of the dashboard
The usual way is to (as Julian said) have a text/prompt in the dashboard, grab that in msg.payload or similar and then pass that to your function node
Craig