Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to add a space in an if then text calculation?

Featured Replies

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

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 ".

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 "

  • 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 ")

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

  • 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

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

  • 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

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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.