Jump to content
Server Maintenance This Week. ×

consolidate ID numbers


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

Recommended Posts

I have an address db that was created a long while back ( ie not related) As such there is a record for each staff member of a company. (hence multiple company records)

To migrate to a related solution I need the company to have a unique id number. Is there a way I can do this - ie the multiple company records will need the same ID number.

Many thanks

Version: v6.x

Platform: Mac OS X Panther

Link to comment
Share on other sites

John->

1) define a field CompanyID

2) Search by a company's name, the found set will have everyone in that one company

3) Create and then execute single step script with Replace Contents [No dialog, CompanyID, "xxx"}, where x is hand coded into the script step.

Replace Contents only works for the found set.

There are other, more automated ways to do this. if you have a few companies, this is probably easier. if you dozens of companies, you may want to automate this.

One problem will be ensuring that the company name has been spelled the same for every staff member in that company. if not, the search, and automated solutions, will not convert 100%.

Link to comment
Share on other sites

Hi,

I suggest that you use a technique such as the one shown in the demo under the heading of 'Finding only one of each record when there are duplicates!' at http://www.nightwing.com.au/FileMaker/demos5.html#d to locate a single occurrence for each company, then run a 'Replace Contents' procedure (using the serial number) option to assign unique IDs. You'll then be able to export relevant fields and use this data as the basis of your companies table.

I slightly adapted version of the find unique script would enable you to write the corresponding companyID values to all the corresponding company records, and you'll then be able to create a relationship to the company table, delete the company details fields and put related fields onto the layouts in their place. cool.gif

Link to comment
Share on other sites

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