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

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

Recommended Posts

Posted

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,

Posted

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.

Posted (edited)

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

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

Posted (edited)

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

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