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.

Need help with a find and replace, using symbols

Featured Replies

  • Newbies

I am trying to write a script that will replace a text string within a certain field with an extended ASCI character. In this case, after migrating from a Mac enviroment to a PC environment, the original pie and delta symbols got converted to underscores and AE symbols. I have a script that will do a global find and replace, however I cannot get pie and delta symbols to insert from the calculation. It just returns P and D, respectively. The pie and delta symbols are shift+P and shift+D in the symbol font, but I know that script maker doesn't return formatted text unless copied and pasted.

Anyone know any tricks around this?

The field that needs these symbols, contains paragraphs of text, so the entire field must not be formatted with the symbol font, only the characters that need to be pies and deltas. I work in a law office and pie stands for plaintiff and delta stands for defendant. The attourney who uses these symbols will not accept anything else.

I basically need to know a method to find every instance of a "_" and replace it with a "π" and also "

I'm not sure this will work. Can you get the characters in a regular font on Windows? For instance, I can press Shift-Option-P to get a capital pi symbol in most fonts.

If you can do this, then create a global field with the contents of a capital pi symbol. Then use the Substitute function to replace all occurances of _ with the contents of that fields, as in Substitute( YourField, "_", gPi ). This can be done with either a looping script or a Replace Contents.

The only other option I can think of is to see if there's a plugin that can help. Check out http://www.fmplugins.com

Chuck

I do something similar. I used the web companion plugin to convert the high ascii into the ampersand cluster, where routine find & substitute commands can be used. Go to application preferences/plugins and enable the web companion. Then make a calculation field where the calculation is;

External(Web-to-HTML, TextField)

If TextField is you field containing the high asci, then this calculation will replace the

  • Author
  • Newbies

The problem here is that to get a pi and delta symbol, the actual text has to be formatted in the Symbol font. Filemaker does not seem to use extended ASCII characters (beyond 255), so you have to get those symbols by using this specific font. Thus Pi and Delta are the same as P and D. When pasting the symbols from an external program like a text editor or character map, they just import as ? marks.

If I was to replace an ampersand cluster, the replace string must still be formatted text. Maybe I am not fully understanding your solution. Oh, and my above post was not intended to show the actual ampersand cluster of pi and delta, they were supposed to be the actual symbols.

Also how do I do a paste from within the Substitute function? Is it possible? If I could do a find a replace using clipboard data from a copied field that has the symbols (as formatted using the symbol font), then maybe it could work. However, my fear is that the Substitute function strips text of all its formatting, or maybe the entire Insert Calculated Result does. Then what to do?

Thanks for your replies, BTW. I will try experimenting with Replace[].

As soon as you use a calculation your text will loose its formatting

You can still pull it out with a script that loops thru the text, and pastes it back in blocks, recognizing where the symbol character should be placed and pasting in its place the proper symbol character that you've put in a global field

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.