Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Prefixing data field in Filemaker

Prefixing data field in Filemaker
Thread Tools
Forum Regular
Join Date: Jan 2001
Location: Hollywood, CA
Status: Offline
Reply With Quote
Jan 21, 2004, 08:22 PM
 
I working on converging about 100 separate databases into one large one.

In order to do this I need to add a prefix to one of the data fields. The field is used for the library number. If I combine them, I'll end up with duplicates. Is there an easy way to add a couple of letters to the beginning of the field without losing what's currently there?

I know I must be missing something really easy. Any help is appreciated.
Thomas
--
49,000 Units and counting...

blog.noetech.com
     
Dedicated MacNNer
Join Date: Sep 2000
Location: Boulder City, NV USA
Status: Offline
Reply With Quote
Jan 21, 2004, 09:56 PM
 
You could make a new field that is a calculation of the prefix plus the old one.
     
Forum Regular
Join Date: Jan 2001
Location: Hollywood, CA
Status: Offline
Reply With Quote
Jan 21, 2004, 10:25 PM
 
Originally posted by spiney:
You could make a new field that is a calculation of the prefix plus the old one.
I'm looking to add two letters in front of the number. I think calculations have to result in a number.

I'm thinking that there has to be a way to do this with a script. I just figure it out.
Thomas
--
49,000 Units and counting...

blog.noetech.com
     
Dedicated MacNNer
Join Date: Sep 2000
Location: Boulder City, NV USA
Status: Offline
Reply With Quote
Jan 21, 2004, 10:31 PM
 
Calculations can end up as number, text, date, or time. In the calculation box at the bottom there is a choice.

So to add two characters to the beginning of another field you would use the syntax:

"AB" & Fieldname
(Last edited by spiney; Jan 21, 2004 at 10:38 PM. )
     
Forum Regular
Join Date: Jan 2001
Location: Hollywood, CA
Status: Offline
Reply With Quote
Jan 21, 2004, 10:52 PM
 
Originally posted by spiney:
Calculations can end up as number, text, date, or time. In the calculation box at the bottom there is a choice.

So to add two characters to the beginning of another field you would use the syntax:

"AB" & Fieldname
Thanks, I'll give it a shot. Here's another question. Will I be able to remove the calculation and keep the data? I'll need the field to return to a normal one.

Or maybe I could do that with the search and replace? I believe that allows calculations. I don't have Filemaker in front of me to check.
Thomas
--
49,000 Units and counting...

blog.noetech.com
     
Fresh-Faced Recruit
Join Date: Dec 2000
Location: Pillsbury, Inc.
Status: Offline
Reply With Quote
Jan 22, 2004, 12:27 AM
 
An alternate way is to do a replace. To do this, make sure the cursor is in the desired field and select Replace (or Replace Contents) from the Records menu. Then select "Replace with calculated result" and enter the appropriate calculation.

Before doing this, make sure all of the records are being displayed (Records->Find All).

If you've already created a new field like spiney suggested, then you can simply switch the field type from calculation to text.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:42 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2