Steven Swallow Posted October 15, 2009 Posted October 15, 2009 (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 October 15, 2009 by Guest
LaRetta Posted October 15, 2009 Posted October 15, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now