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

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

Recommended Posts

Posted

Hello

I have a test field -Field "A"- that has faulty data entered into it. ( it is not always in the same structure)

The problem is : Sometimes the 10th paragraph return has a parenthesized 5 digit zip code at the end of a phrase --like County : Madison : (13421)

and In this case I would like to add a BLANK SPACE as the 11th paragraph return and move down everything a single paragraph return

If the 10th paragraph does NOT have a parenthesized 5 digit zip code at the end of the phrase i would like to do nothing

Example (this is what I would like to script IF the 10th paragraph contains a parenthesised zip code at the end of that line -just add a space after it that doesn't presently exist...)

xxxxxx

xxxxxx

xxxxxx

xxxxxx

xxxxxx

xxxxxx

xxxxxx

xxxxxx

xxxxxx

xxxxxx (13567)

xxxxxx

xxxxxx

Could someone tell me how to do this?

Thanks

Dave

Posted

test if the text between position(" par.gif ",9) and position(" par.gif ",10) is >999 or 9999 (if 01234 is a valid zip) and has patternCount(, "(") and patternCount(, ")") both>1. then replace() position(text," par.gif,1,10) with " space par.gif ".

Posted

Hi hartmut77,

I'm not sure that I'm completely following you, (Do you want a paragraph return after the ")" or a space?) I'm going to assume that it is a Paragraph Return "

Posted

Thank you for your help

I tried to use the find and replace in filemaker but it will not let me add a pilcrow like a word processor.

In that case I would like to find the occurence of

)^pL and replace with )^p^pL but I don't think I can do this with the find/replace command.

As far as scripting- I am looking for the same thing

In the field "A" looking for the occurence of ")

Posted

In the Find and Replace, use the Find ")" and replace with ") and a capture a return out of a field" instead of the pilcrow

Lee

Posted

Lee - I tried it an it didn't work for me.

I am on a mac if that makes any difference.

In the find and replace I looked for the ")"

and the replace I typed in the same but copies the return out of the field and it doesn't seem to work.

Dave

Posted

I'm on a mac also, hence the apple logo I always use in my replies. smile.gif

Type this in a field (that's what I did):

)

This equals " ) and a Paragarph", and then copy it and paste it into the Replace box

Lee

cool.gif

Posted

Thanks Lee it worked . I just couldn't see it in Filemaker. Thanks for the help. I still wish I could learn to do this by script. But this solves the problem.

Thanks again

Dave

Posted

Oh, but you can do it by script and you can do it directly by using the Replace under the Menu as I stated before. In fact, before FM version 6, it would have been the only way. You want to use the Substitute calculation function. In a script, you can do this with either the Replace or Instert Calculation steps (choose one) when you get to the "Specify Calculation" box, use this calculation naming the field you have the ")" in now:

Substitute(YourFieldNow, ")", ")

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