Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Replace Text in Code

Topic Labels: Formulas
Solved
Jump to Solution
203 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi there!

I’m looking to replace text a field with a figure from another field.

I can get this to work if I reference the code via another field but I can’t figure out how to insert it via a formula (so that I don’t have to fill a field with this dummy data every time).

Not too familiar with markdown/the symbology etc sorry!

Screenshot 2022-09-23 at 17.39.56

1 Solution

Accepted Solutions

Your text includes double quotes, so your formula breaks when it gets to plotWidget because its’ wrapped in double quotes and is interpreting the first quote as the end of the first argument in your Substitute function.

Try using single quotes to enclose your HTML.

SUBSTITUTE(
'<span id="plopWidget"></span>...',
"XXX",
{product_id}&""
)

See Solution in Thread

2 Replies 2

Your text includes double quotes, so your formula breaks when it gets to plotWidget because its’ wrapped in double quotes and is interpreting the first quote as the end of the first argument in your Substitute function.

Try using single quotes to enclose your HTML.

SUBSTITUTE(
'<span id="plopWidget"></span>...',
"XXX",
{product_id}&""
)

You’re the best, thanks so much