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.

Calculation for creating code names from the first 2 characters from several fields

Featured Replies

Hello, Please help me make a calculation that will combine the first or last, 1 or 2 characters from several fields to create a Code Name for an item.

For example:

Season: Fall

Year: 2010

Type: Shirt

Item_ID: 12

Code Name: F10SH12

I've been searching for an answer for an hour and figure that I don't even know where to look. The answer is probably very simple.

Thanks! Heatherrd

Use the Text functions like Left and Right to grab pieces of the field. Use the ampersand (&) to concatenate the text.

E.g. Left(Season;1) & Right(Year;2) & etc.

I highly recommend that you do NOT use your calculated code as the primary key, i.e. as a field you use to create relationships to other tables. Use an auto-entered serial number for that, and use your calculated code for labeling or whatever you have in mind.

Also, Spring and Summer both start with S but I assume you have a plan for that.

If the code you require - F10SH12 - is first character of Season; last two of Year; first two of Type; last two of Item_ID then the calc is:

Left (Season; 1)& Right(Year; 2) & Left(Type;2 & RighWords(Item; 1)

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.