Help

Re: Append Rich Text Checkbox Adding Line Break

Solved
Jump to Solution
1280 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Shayne_Bundy
6 - Interface Innovator
6 - Interface Innovator

I have an Automation set up to append items to an existing Rich Text Field, in the format of a checkbox list. The append Automation works well, except it always leaves a line break above the appended item, making a blank line in my list.
The Rich Text Field looks like this (after the append Automation is run):
Existing Item
Existing Item

Newly-appended item

Does anyone know why this is happening, or how to avoid it? Thank you!

1 Solution

Accepted Solutions
Ben_Young1
11 - Venus
11 - Venus

Hey @Shayne_Bundy!

I went ahead and created a quick demo to help troubleshoot with.

Ben_Young1_2-1669923148022.png

The 'Write Target' linked record field links to the same table.

The quick automation I created will fire off whenever a record is linked via the Write Target field.
It will then take both values in the String field, and append the new values to the target record's field.

Ben_Young1_6-1669923411249.png

Snag_14233e9d.png

My main suspect in why you're seeing linebreaks when your text is being appended is that you have existing whitespace in your fields.

In the above screenshots of the intended behavior, the text between the two bodies is:

This is my original string value.
This is my string value for Record 2.

If I add a linebreak in the field like this:

This is my original string value.
This is my string value for Record 2

Then this will happen:

Ben_Young1_8-1669923978249.png

Similarly...

- Record 4
[] Task Item 1
[] Task Item 2
- Record 3
[x] Task Item 1
[] Task Item 2

Will yield the expected result of:

Ben_Young1_12-1669925005227.png

But if you were to have added an unintended bit of whitespace like this:

- Record 4
[] Task Item 1
[] Task Item 2

Then you would see the behavior you're encountering, similar to this:

Ben_Young1_11-1669924980485.png

At this point, I can think of three ways to approach this problem.

  1. User Training: Put guidance in place to inform users that they need to keep their strings clean if the appended text is to be output in the desired format.

  2. Formulas: Create a formula that will format your string. From there, your automation will only look at that field when looking at which values to write and your user(s) will just never see that formula field.
    I'm never a fan of these solutions because it poses such a huge tech debt risk.
    If you have data design problems that require that you create three or four new formula fields to create a solution, you end up with a massive amount of fields that don't really do anything at all for the user upfront and it makes your data model inaccessible and intimidating to users looking at it for the first time if not handled correctly.
    You'll see evidence of this in a lot of scaled data models/apps/bases that have a ton of "dev." fields that most of the time don't even return values because their usage is so niche.
    If you want an example of what it would look like to solve this with formulas, here's how I quickly did it for the sake of showing how bloated it can get.
    Naturally, you'd just hide the formula fields, but it's just a pain to maintain.

Ben_Young1_1-1669926906135.png3. Scripting: This is how I would do it personally, since it all happens in the background and creates a new abstraction layer and protects your data from bloat and single-use fields that you would otherwise have if you used method two.

With scripting, you'd just have the script load the two different text values and clean up any potential whitespace, then output the final formatted value that you will use to write to the target record object.

I apologize for the brain dump, but just food for thought.

See Solution in Thread

2 Replies 2
Ben_Young1
11 - Venus
11 - Venus

Hey @Shayne_Bundy!

I went ahead and created a quick demo to help troubleshoot with.

Ben_Young1_2-1669923148022.png

The 'Write Target' linked record field links to the same table.

The quick automation I created will fire off whenever a record is linked via the Write Target field.
It will then take both values in the String field, and append the new values to the target record's field.

Ben_Young1_6-1669923411249.png

Snag_14233e9d.png

My main suspect in why you're seeing linebreaks when your text is being appended is that you have existing whitespace in your fields.

In the above screenshots of the intended behavior, the text between the two bodies is:

This is my original string value.
This is my string value for Record 2.

If I add a linebreak in the field like this:

This is my original string value.
This is my string value for Record 2

Then this will happen:

Ben_Young1_8-1669923978249.png

Similarly...

- Record 4
[] Task Item 1
[] Task Item 2
- Record 3
[x] Task Item 1
[] Task Item 2

Will yield the expected result of:

Ben_Young1_12-1669925005227.png

But if you were to have added an unintended bit of whitespace like this:

- Record 4
[] Task Item 1
[] Task Item 2

Then you would see the behavior you're encountering, similar to this:

Ben_Young1_11-1669924980485.png

At this point, I can think of three ways to approach this problem.

  1. User Training: Put guidance in place to inform users that they need to keep their strings clean if the appended text is to be output in the desired format.

  2. Formulas: Create a formula that will format your string. From there, your automation will only look at that field when looking at which values to write and your user(s) will just never see that formula field.
    I'm never a fan of these solutions because it poses such a huge tech debt risk.
    If you have data design problems that require that you create three or four new formula fields to create a solution, you end up with a massive amount of fields that don't really do anything at all for the user upfront and it makes your data model inaccessible and intimidating to users looking at it for the first time if not handled correctly.
    You'll see evidence of this in a lot of scaled data models/apps/bases that have a ton of "dev." fields that most of the time don't even return values because their usage is so niche.
    If you want an example of what it would look like to solve this with formulas, here's how I quickly did it for the sake of showing how bloated it can get.
    Naturally, you'd just hide the formula fields, but it's just a pain to maintain.

Ben_Young1_1-1669926906135.png3. Scripting: This is how I would do it personally, since it all happens in the background and creates a new abstraction layer and protects your data from bloat and single-use fields that you would otherwise have if you used method two.

With scripting, you'd just have the script load the two different text values and clean up any potential whitespace, then output the final formatted value that you will use to write to the target record object.

I apologize for the brain dump, but just food for thought.

Shayne_Bundy
6 - Interface Innovator
6 - Interface Innovator

Thank you for this breakdown! I will review the inputs that are causing the problem, and check for extra whitespace. If the issue seems to keep popping up, I will explore the scripting "clean-up
option as a solution, because trust me...I have enough "useless" formula fields, LOL!