Post

3 followers Follow
0
Avatar

Input text on multiple lines in calculation field

I am creating a script in Podio and I'm using the calculation field for my employees to read from. There are some questions that are longer and I would prefer to have the questions on separate lines within the same calculation field. This is my code so far for only one line of text.

var one = @Unique ID
"**This call may be recorded for quality and training purposes. Can I get your name, please. What is the best phone number to call you on?**"

How do I put the text "Can I get your name, please" on its own line? What is the code?

 

Viktor Rybachuk

Please sign in to leave a comment.

4 comments

0
Avatar

Hi Viktor,

insert 

\n

at those places where you want a line break (insteak of the blank space):

var one = @Unique ID;
"**This call may be recorded for quality and training purposes.\nCan I get your name, please.\nWhat is the best phone number to call you on?**"

\n\n returns 2 line breaks

Here you find more about how to style text in a calculation field. The technique is called "markdown":
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

Rainer

Rainer Grabowski 0 votes
0
Avatar

"This call may be recorded for quality and training purposes. What is the best phone number to call you on?"+" \n "+"Can I get your name, please"

kareem ahmed asfour 0 votes
0
Avatar

Thanks guys! Thankyou! I'm using the following code "TEXT TEXT TEXT \n"+

Adding \n"+ allows me to add text to the next line. what does the + really do? I'm not sure what I'm doing and I'm really for these silly basic questions.

Viktor Rybachuk 0 votes
0
Avatar

Hello Viktor,

with + you concatenate something, it's not necessary for line breaks.  E.g. a variable and text
@field x + "text"
or
@field x + " " + @field y

But you can use it also for additions. If field a and field b are number fields and field a = 5 and field b = 10
@field a + @field b 
you get 15.

For this 
"**This call may be recorded for quality and training purposes.\nCan I get your name, please.\nWhat is the best phone number to call you on?**"
you don't need the +  

Rainer

Rainer Grabowski 0 votes