Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Mar 06, 2020 11:11 AM
I have a multiline text field and I would like to use a formula field to take that multiline text and use the existing content but add a bullet point character in front of each new line. Is this possible? I’d like it to happen automatically without manually having to run a script
Part 2 - If that works, I’d like to take the bulleted list and split it after 10 lines into a second field. Is this possible?
Solved! Go to Solution.
Mar 06, 2020 01:50 PM
Hi @Btbml, how are you defining the start of each new line? If it’s just plain sentence text ending in a period, you can use use the SUBSTITUTE
function to force a line break whenever a period is present (and also maintain the period in the final result). Since it lives in a formula this would always transform the text in the referenced field without any manual intervention.
Here’s an example using the formula below:
SUBSTITUTE(Text, ". ", ".\n \n")
Mar 06, 2020 12:51 PM
Responding to Part 1. Not sure how to do Part 2 with only a formula.
Long Text Field
Word1
Word2
Word3
Formula Field
IF({Long Text Field}, "- " & SUBSTITUTE({Long Text Field}, "\n", "\n- "),"")
- Word1
- Word2
- Word3
The formula basically just adds "- " to any new line characters (\n).
Mar 06, 2020 01:04 PM
Two words - Script Block.
Mar 06, 2020 01:07 PM
@Btbml was hoping to avoid
manually having to run a script
@Bill.French
Is it possible (or advisable) to have a scripting block always running?
Mar 06, 2020 01:17 PM
It’s possible to create script blocks that never stop, but it would require the browser instance running the block to remain logged in and connected all the time. And this assumes that Airtable would allow it. They may already have throttles in place to stop runaway scripts.
Yep, it seems to be the increasingly case. To achieve that you need to go to a glue-factory (like Zapier) or a custom API proces$.
Mar 06, 2020 01:50 PM
Hi @Btbml, how are you defining the start of each new line? If it’s just plain sentence text ending in a period, you can use use the SUBSTITUTE
function to force a line break whenever a period is present (and also maintain the period in the final result). Since it lives in a formula this would always transform the text in the referenced field without any manual intervention.
Here’s an example using the formula below:
SUBSTITUTE(Text, ". ", ".\n \n")
Mar 06, 2020 01:52 PM
You can also add in a bullet point to the start of each new line using an emoji: SUBSTITUTE(Text,". ", ".\n \n • ")
Mar 09, 2020 08:08 AM
I completely forgot about the substitute formula.
Re: script running all the time, we do use integromat for a number of other things so I’ll look into that