How to add a message node into a variable

I would like to insert a message node into a variable and present it later in a final report.
i tried with {{event.payload.text}} but its not working.

any ideas please?

Hi @raul,
For my understanding you’re trying get message node(node name in the flow).Use setVariable or setGlobalVariable actions to store the message node name. Current node name will be available in event.context.

Hi @Vijayakumar_Raghu.
thanks for your response

When I am calling to this variable it returns it empty.

Hi @raul,
event.context is object. So it will be empty or object. Set variable has {{event.context.currentNode}}. Do this action in on receive

Hi @Vijayakumar_Raghu
When I am asking the content may I use Text: {{temp.dataBlock}}?

hi @raul
Right. you can use it as {{temp.dataBlock}}

Hi @Vijayakumar_Raghu

It is coming empty :frowning_face:
botpress2

Hi @raul
Let me check is there any other way and update

Hi @raul,

Can you use this

{{event.state.context.currentNode}}

This will work.
Screenshot from 2020-07-06 18-43-08
Screenshot from 2020-07-06 18-42-34

Let me whether it’s working for you

Hi @Vijayakumar_Raghu
It is showing the name of the node but not the context.

Hi @raul
Can you be more specific. You need entire context in a variable?

@Vijayakumar_Raghu I have a node, let’s call it Cars in this node I have text with name of cars.
I would like to be able to call this node and see the name of the cars.

Hi @raul
My understanding is like. when user enter car name then the Cars node should be called. Am I right?
Or
You need to see the name of the cars without user interaction

@Vijayakumar_Raghu No, there are few choices that the user is clicking on, the last node will show a choices that made by the user in a report.
in this report in want to show the text of the node.

Hi @raul,
Can you share some screenshot of your flow?
So user select few choice in the flow(You are getting report from that flow). And that end of the flow your showing report at the end of flow.
My understanding is you need to push all user selected choice in one variable and display in it in last node. Am I right?

@Vijayakumar_Raghu Yes! :slight_smile:

Hi @raul,
First of all. let me try simple flow as your use case. And I will update you.

I don’t think so you can store array using setGlobalVariable or setVariable built-in actions.
You can create your own custom actions according to your use case like storing the array in variable.

@Vijayakumar_Raghu
is that possible to call them by order?
I mean if the user clicked on the red car first and after that on green car it will be shown in the report as per the order of his choices?

Hi @raul
I have created simple flow as your use case.
Flow Like:
Bot will ask one question
User will reply for it. The user Reply is store in variable
That end of node the user respose are shown. I will attach the image for your reference

Flow Image

Set user value in setGlobalVariable on Receive

Web-channel image

Let me know. If you have any doubt

@Vijayakumar_Raghu
thanks again, but its not what I mean.
i sent you the flow in a private message, can you take a look?
I need to call the nodes and present them in the final report.