Help

Re: Removing HTML code in the beginning of text

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

Hey Guys!
Im trying to remove a text in the beginning from a lookup field, by formula.
The text starts with "<div class="vaning"></div><div class="namn">" and I want to remove “<div class="vaning"></div>” in the beginning.
I tried with the replace formula but only get error messages, does anyone know why?
For example:
REPLACE({field name}, 1, 26, “”)
Thanks J

1 Solution

Accepted Solutions

Ah, OK, this ie because the lookup field is an array not a string. What you need to do is turn the lookup field into a string, then it will work fine. So:

REPLACE(Lookup & '', 1, 26, '')

Joining the Lookup field with an empty string will convert the array to a string, then REPLACE can do its work.

See Solution in Thread

4 Replies 4

Your formula works fine for me, although check you are not inserting formatted quotes (just use plain text quotes).

REPLACE(Name, 1, 26, '')

Screenshot 2022-02-07 at 20.08.31

Hi Jonathan
It works on an ordinary textfield as you mentioned, but not on a Lookup field and I don’t know how to get around that?

Ah, OK, this ie because the lookup field is an array not a string. What you need to do is turn the lookup field into a string, then it will work fine. So:

REPLACE(Lookup & '', 1, 26, '')

Joining the Lookup field with an empty string will convert the array to a string, then REPLACE can do its work.

Yes that works great, just found that if I do a Rollup field instead, the original formula works as well.
Thank you for your advice.
Jesper