June 20, 200322 yr 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
June 20, 200322 yr test if the text between position(" ",9) and position(" ",10) is >999 or 9999 (if 01234 is a valid zip) and has patternCount(, "(") and patternCount(, ")") both>1. then replace() position(text," ,1,10) with " space ".
June 20, 200322 yr 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 "
June 20, 200322 yr Author 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 ")
June 20, 200322 yr 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
June 20, 200322 yr Author 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
June 20, 200322 yr I'm on a mac also, hence the apple logo I always use in my replies. 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
June 20, 200322 yr Author 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
June 20, 200322 yr 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, ")", ")
Create an account or sign in to comment