displaying code in chat
# 🤝help
r
I'm going through the Botpress Basic video tutorials, number 17 Capture Multiple Variables, and the code is displaying within the chat reply on some, but not all, even though they follow the same settings. All within one Standard Node: Raw input: Can I have your name, email and favorite color? Person name card: store result in workflow.Name, extract from history 1 Email card: store result in workflow.email, extract from history 1 Color card: store result in workflow.color, extract from history 1 Text card: Your name is {{workflow.Name}} Your email is {{workflow.email}} Your fave color is {{workflow.color}} In the emulator, raw input card asks the question, I answer "Mable, mable@gmail.com, green", Log indicates captured variable for all three variables. Chat replies: Your name is { "first": "Mable", "last": null } Your email is mable@gmail.com Your fave color is { "colorName": "Green", "hexCode": null, "rgb": null } What have I done wrong? I also tried "@workflow.Name" and "{{workflow.Name.first}}" but that flags red.
q
Person name card: store result in workflow.Name, extract from history 1 Try answering with both the first name and last name, as expected by that card.
f
Your name is {{workflow.Name.first}} Your email is {{workflow.email}} Your fave color is {{workflow.color.colorName}}
r
Thanks for trying to help. Tried that and it displays: Your name is { "first": "Wendy", "last": "Lee" }
Thanks. I tried that already too and I get an error with red highlights for that code.
f
What does it say? Can you send a screenshot of what you tried
q
Try this Text card: Your name is {{workflow.Name.first}} {{workflow.Name.last}}
Like Decay mentioned earlier ⤴️
I didn't use the Color card because I didn't know it existed; instead, I used Raw Input. Using the Color card: Your favorite color is {{workflow.color.colorName}}. Now I know 💡
r
Thank you for helping me out!
hmm, so your bot worked as you designed but when I added the functionality from the tutorial from Botpress to consolidate the 3 questions into one Raw Input and then used Advanced Config feature in each capture info card to Extract from History >number of messages 1, the code displayed again. Can you figure it out or perhaps this is a bug for Botpress? https://cdn.discordapp.com/attachments/1222945780994801705/1222979978753478736/elegant-swan_-_2024_Mar_28.bpz?ex=66182fdc&is=6605badc&hm=d8fd31061f4a6ce564de4c474fb8178309e73103504aa25f5abdb0c630f3e446&
So, I removed color capture card and used number and it no longer prints code so it is an error with the color capture card @square-energy-41150
7 Views