Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4749 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a text field called "Sample HTML Code" that contains the following contents:

<tbody class="result">

<tr>

<td>

<span>Price not displayed.<span class="tiny"> <a href="/gp/feature.html?ie=UTF8&amp;docId=174014">Why?</a></span></span>

<div class="shipping_block"><span class="price_shipping">+ $150.00</span><span class="word_shipping">shipping</span></div>

<tbody class="result">

<tr>

<td>

<span class="price">$1,616.42</span>

<div class="shipping_block"><span class="price_shipping">+ $113.49</span><span class="word_shipping">shipping</span></div>

I Want to remove a portion of this text field and just delete it. The text portion being:

"</span></span>

<div class="shipping_block"><span class="price_shipping">+"

I want to leave the rest of the field intact and just delete that one section. Should I create a script or calculation/script trigger? Additionally, how do you remove just a section of text from a field in filemaker?

Posted

Let( losetext="[b]</span></span>[/b]





<div class="shipping_block"><span class="price_shipping">+";

Substitute(MyTextField; losetext;"")

)

You may have to insert the pilcrow (¶) character in place of the newline characters in the text.

Posted

I repaired your sample. As I said, the newline characters had to be replaced with ¶. Because (probably) the text was copied and pasted from an actual HTML file, there were a lot of space characters interspersed. I had to take the text from your field and paste it into a text editor that showed invisible characters. I then made the substitution. I also had to escape the quotation marks within the text with \.

This topic is 4749 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.