I used set block to simplify the repetitive frame, where I would like to insert a line break into the text of the card. What should I do? Alexa guide told me to put in \r\n. It doesn’t work well on card block.
It had worked before by just pressing Enter, but now seems not allowed.
As workaround, open text editor, edit some texts with line breaks, then copy and paste into card blocks.
Thank you for your reply, but I already know what you said.
What I’m curious about is how the developer should set the card text as a variable to export different card text repeatedly, and then how to save the return value in the set block.
In the alexa guide, developer can enter \r\n or \n for coding, but I’m asking how to deal with this value in the Voiceflow.
This is how to use variable in Speak block. same in Card block.
I already know how to use variables. What I’m really curious about is how to include a return value when saving a card text as a variable.
return value from where?
For example, suppose you want to use multiple card text repeatedly, and you want to use return to separate sentences. As you said, you can use copy and paste on the text editor, but line break does not work when you set it as a variable and specify the sentence with the value of that variable. The first picture is a situation where the sentence is being continued because the set block cannot give a return value, and the second picture is the case where the return value is applied because the sentence is entered directly into the card block.
I solved the problem using API through Google Sheet. Thank you again for your answers.
Yeah, you can also use a code block to set a variable like so:
card = ‘this is my first line\nAnd the second one’