Nov 27, 2022 03:10 PM
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!
Solved! Go to Solution.
Dec 01, 2022 01:22 PM
Hey @Shayne_Bundy!
I went ahead and created a quick demo to help troubleshoot with.
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.
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:
Similarly...
- Record 4
[] Task Item 1
[] Task Item 2
- Record 3
[x] Task Item 1
[] Task Item 2
Will yield the expected result of:
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:
At this point, I can think of three ways to approach this problem.
3. 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.
Dec 01, 2022 01:22 PM
Hey @Shayne_Bundy!
I went ahead and created a quick demo to help troubleshoot with.
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.
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:
Similarly...
- Record 4
[] Task Item 1
[] Task Item 2
- Record 3
[x] Task Item 1
[] Task Item 2
Will yield the expected result of:
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:
At this point, I can think of three ways to approach this problem.
3. 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.
Dec 01, 2022 01:33 PM
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!