https://discord.gg/botpress logo
2 result in one workflow
# 🤝help
f
Hello Is it possible that when we save a result in a workflow, if something was already written, it appends the new result after the old one instead of erasing the old result and replacing it?"
e
A simple way would be to use 2 vars. Let say workflow.userPreferedColor as a String and workflow.userColors as an Array In your capture card you simply use the string to get the user result. A Single Choice card or any other one. This one will always be override by the new user selection. Then, just after this capture card you simply add a Code Card. What you'll do is add a line of code to add the new user response to the array, something like workflow.userColors.push(workflow.userPreferedColor) The Array will always add the new item this way. Later in the flow, when needed you can use or display the Array. This is a generic example. Let me know what you try to acheave and we'll see how to adapt to your needs.
f
Ok thx
2 Views