Carriage-return not being displayed in text field

I have a cell that has a formula that uses the Char(10) to create a carriage return. It displays correctly in Google Sheets but not in Glide (See screenshots). I’ve tried both “Text” and “Rich Text” fields.

This is the formula in Sheets:
=iferror(textjoin( CHAR(10) ,true , query(‘AFSSC done’!$A$2:$B,“select B where A='”&$A10&"’ order by B asc ") ))

31 ![Screenshot%20(2)|606x499](

1 Like

here it is in GLide…

@mptA1 Try using “/n” instead of char(10).

How do you mean? With or without quotes? i tried both in the formula… with quotes it just displays the chracters, without the quotes the formua give an error.

thanks

CTRL+ENTER might work also. I use that for carriage returns when typing into the formula bar in google sheets. You don’t see a character, but it’s always worked for me to break to a new line.

Also change to a Rich Text Component. I don’t think Basic Text will show line breaks.

ctrl+enter is what I did originally and it didn’t work in text or rich text. That’s when I tried char(10), which doesn’t work either.

My mistake, I had Google Script (javascript) on the brain, and even then I should have used \n (backslash n). Totally mislead you, sorry.

1 Like

I know that Glide advises us not to use HTML but
is how I do the line breaks:
=“Line number 1.
” &
“Line number 2.
” &
“whatever.”

those are ctrl+enter within the cell? If so, that doesn’t work. It doesn’t show up in text or rich text field.

It’s not the ctrl+enter’s that is doing it. It’s the < b r / > 's

OK, I swear this worked for me before using a single line break, but maybe I was doing something different. I recall now that markdown requires 2 carriage returns for a line break. Try that and use the Rich Text component

Actually 2 spaces and 1 carriage return. 2 carriage returns is a paragraph break.

2 Likes

Thanks @Jeff_Hager that was it! Use 2 carriage returns did the trick!

2 Likes

This should be in the documentation or something. I really needed this trick! Thanks!

2 Likes

I attempted this in a Glide Table template that outputs to a Checklist Title field, & it didn’t work :frowning:

Can you show how you configured the template column, and describe what your expected output should be?

To put it simply, in the template field I entered
"week,

start-end"

This is going into a Checklist Title field, & I have “Allow text wrapping” checked. I was hoping to achieve:
Mon,Tue,Wed,Thu,Fri
6pm-10pm

In stead, it looks like:
"Mon,Tue,Wed,Thu,Fri 6pm-
10pm

What you see is expected. To get the effect that you want you would need to over ride the default styling with some Custom CSS. This will only be possible if your checklist is used on a Details Layout.

You could try the following in a rich text component on the same screen:

<pre><span><style>
[data-test="list-item-title"] {
  white-space: break-spaces!important;
}

Note that this is not officially supported, and not guaranteed to work.

2 Likes

In this case, my workaround for now is to simply add a line of [nbspace]s (" " - As you probably know they look like spaces, but they aren’t ignored & output as a single space) between the text I want on my 1st line & the text I want on my second line. This of course has the side effect of giving an uneven position for the second line.

Edit:
...so I might try to include tab characters as well.
(Doesn’t work. Too bad there doesn’t seem to be an nbtab.)