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.

Text Function to strip first letter of every word.

Featured Replies

Does anyone have a quicky way to get the first letter of every word of a string? My client insists on using a serial number with letters that represent the product. So, I need to take a string which could be 1, 2 or more words and take the first letter of every word and concatenate it with a incrementing serial number. i.e. Georgia Bulldogs = GB001, or Alabama Crimson Tide= ACT001 and so on. Any thoughts?

Version: Developer v6

Platform: Windows XP

Here's one method. Just add your serial to the vlInitials field, and use a script to set a field with the result, if you need to have this field indexed.

Kent.zip

  • Author

Could you give an example? I don't think I follow. Sorry

  • Author

Duh,,,, Thanks See That's why I'm still a Newbee. Sorry bout that.

Thanks

  • Author

Ok, looked at the attachment. Sorry, but still confused. Could you explain the significance of the repeating fields and the relationships you did? I my customer has 4000 records or so. I can't make a repeating field for that long. Couldn't I do this without the repeating field? Sorry about the confusion. Thanks

The repeating calculation field is specific to each record with a maximum (in the example) of 20 words. You can add/remove repetitions if you'll only have a max of 5 words per string or 25 words, etc. The repeating global index simply contains the consecutive numbers 1 - 20. The constant self-relationship is used to lookup the global index into a number field so that it can be indexed.

The calculated repetition then uses this index to determine what value should result for each repetition. For the first five repetitions, Case(WordCount(Extend(text)) >= repIndex, Left(MiddleWords(Extend(text), repIndex, 1), 1)) would be similar to

Case(WordCount(text) >= 1, Left(MiddleWords(text, 1, 1), 1)) & "

  • Author

ah ha... Now this makes sense. Thanks so much... With regard to the serial numbers, the client only said that they use the incrementing numbers from each team name. in other words, if a team (Georgia Bulldogs) had 50 products, and another team (Northern Illinois Huskies) had 100 products, we would have serial numbers of GB050 and NIH100 repectively. So the next product for each team would be GB051 and NIH101. I'm not sure if this is easily done, if not, I don't see a problem with just adding a generalized record number to the Initials, After all, I don't think it will ever run into a repeat. If we do it like my client asks, if we have a team with the same initials, we will have the same serial number... NOT GOOD! I'll have to talk them out of their thoughts. Thanks so much for your help!

Then it would probably be easiest to create an auto-enter serial and append it to the end of the vlInitials calculation.

The pleasure is mine. cool.gif

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.