Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted (edited)

Quick background first. Pretty familiar with MS Access albeit a year rusty, and am now working in a Filemaker environment, have literally just installed FM10, and am very new.

I'm trying to create a field that autofills itself with the first five letters of a company name (once a company name is entered into the company name field), then sticks a unique 5 digit number on the end. For example, if I create JobServe as a company, it should autofill as;

JOBSE/10000

Then if I add IBM as a company it should go in as;

IBM__/10001

(_ is used to denote two spaces)

Hope that's clear! Is this possible?

Thanks in advance.

Edited by Guest
Posted

Hi Steve, welcome to FM Forums!

I suggest you keep the auto-enter serial number of 10000 and increment by 1. And use THIS id (called CustomerID) for all relationships. YOu really don't want to use a field with meaning (part of the company name) for relationships because, what if they change the company name (hey, it can happen)? Unique serials should be meaningless.

Then you can create a calculation (type text) with your special 'display' number you've requested (just be sure you don't use this number for relationships):

Let ( [

co = Left ( CompanyName ; 5 ) ;

pad = 5 - Length ( co )

] ;

co & Right ( "_____" ; pad ) & "/" & CustomerID

)

This calculation has 5 spaces within the quotes, indicated by 5 underlines.

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