Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi

I'm working on a FileMaker based content management system.

Users post their updates into the system and they appear on the web.

I'm trying to make a field so that it shows the first 90 or so words of an update, so that I can do a PHP include to it on the front page.

When users make an update, certain users can post HTML in theirs.

In my synopsis field, I've tried the LeftWords function and the MiddleWords function and both seem to produce the desired effect.

Apart from...

Where a user has put html in the opening line of their update

For example


<img src="http://imagelocation" alt="" border="0" align="right" />rest of update follows on from here

Then the opening < gets cut off from the synopsis field by both LeftWords and MiddleWords.

Obviously then the image doesn't display properly.

Is there a way to get this to work in a calculation but witout the clipping of the opening '<' character??

Why does the opening '<' character get cut off?

If there's text in front of the opening '<' then it works.

Any ideas?

Batfastad

Posted

In case your text ends with a closing carat or you just want to be safe, you could also use something like

Substitute( Substitute( MiddleWords( Substitute( Substitute( UPDATE TEXT, "<", "YYYY" ), ">", "ZZZZ" ), 0, 80 ), "YYYY", "<" ), "ZZZZ", ">" )

This topic is 7353 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.