Hello,
Does any one know how to use Return Data method in Rocketbot?
I have one child bot where in variable section I have one variable with value which I want to use in Father bot.
I have create same variable in Father bot and when I execute from DB the child bot , i am getting error as «string indices must be integers».
Thank you!
Bender
Hello Anonymous,
To return the data to the parent, you must use the Set Variable command, in the «Data» input you must enter the child’s variable (the value you want to share, in double quotes if it’s a string) and in the other input you must enter the father’s variable (where you want to store the value).
ex:
nikhil.agnesh1@gmail.com
Hello Bender,
Thank you very much. It works.
Do you know why we have «Return Data» method under Scripts sections which says return data to the father bot? It is really confusing.
Thank you.
Bender
Hi Nik,
Yes, I attach a description of this command.
Return Data
This command is useful for sending information to a Parent robot. The parent robot must call the child robot with the rocket.start() instruction.
Example:
We have a parent robot, which contains a variable
{res}
which will be where we will receive the response from the robot called Return_InfoIn the child robot (Return_Info) we will have the Return Data command with the following example data:
We can send any type of information, string, booleans, dictionaries, lists, etc.
When the parent executes the child, it will receive the information in its
{res}
variable.nikhil.agnesh1@gmail.com
Thank you Bender, appreciate it.