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

find and replace within text string

Featured Replies

Is there a way to search a text string for a list (value list?) of specific terms and replace them? Specifically:

1 - User entry - types text line

2 - Calc field with "Proper" function cleans text.

3 - Writes cleaned text to description field.

. . . this part is running fine.

The challenge is that we have some terms that need to be caps (ie. ABC, CBS, JVC, IBM, II, etc.) within the text string. Is it possible to have a running list of these terms that can be checked against? If found, it would replace only those letters with the all caps version. I would like to insert that function between 2 & 3.

thanks,

It's possible, but it would require either a custom (recursive) function or a looping script, since each word needs to be processed individually. Another difficulty is to preserve punctuation marks.

I just tested the custom function Here and it seems to work.

HTH

Lee

[color:red]ps

I notice a small glitch in this CF, if you have any variations of abc, ibm, etc, it will need to be added to the list. i.e. Abc, or Ibm

Edited by Guest
ps

  • 1 month later...
  • Author

OK,

I have been playing a bit, and have some success, but don't know how to check a single field through a list of 27 options. Here is what I have, and it works, but just for one option so far.

field - what it does:

desc_input - Simple text input

desc_proper - calc value; Proper ( desc_input )

desc_CAPS - calc value; Substitute ( desc_proper_step ; "Ada" ; "ADA" )

It is working, takes the text from/to:

maNy ada unitS

Many Ada Units

Many ADA Units

This is what I want, but how do I add more options? I.E, IBM, CVS, EOA, etc.

thanks

attach a copy of your file so that we can see the fields and calculations.

Lee

  • Author

A partial list of options to check:

"Ada" to "ADA"

"Adw" to "ADW"

"Aec" to "AEC"

"Amb" to "AMB"

"Efh" to "EFH"

"Bi " to "BI "

"BJ's" to "BJ's"

"Pms" to "PMS"

Thanks, the file is attached,

I did it here using calc fields. Would there be any advantage if I did it in a script instead?

proper_check.zip

Edited by Guest
added question

Agnès and Debi have toyed with this approach for quite a while:

http://www.briandunning.com/cf/899

And it can be used like I show it in the attached template.

--sd

twowaystreat.zip

  • Author

That looks like it will do the trick. Thank you both!

  • Author

I ended up taking this idea and changing it to a script. I can now call it from multiple layouts as needed.

thanks again.

Create an account or sign in to comment

Important Information

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

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.