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 7438 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I have a database with 30 separate name fields that I need to combine into one repeating field (with each of the 30 names in a separate repetition). I can get to the point of setting the new repeating field as a calculation field that repeats and I can set each of the 30 separate fields to appear in the repeating field. The problem is that they all appear in the FIRST repetition. I'm obviously missing a calculation step that sends the next step to the next repetition. Or is this even possible? Can someone help?? I'm using FMPro 6 on Mac OSX.

Thanks!

Posted

Dear Ugo:

Thanks for the script above. I *would* like to create a portal with the names listed in it. I have a separate file for the names and contact info, and ID already. Any suggestions for a script that selects the correct ID and places it into the portal? I really don't want to reconnect the names to the portal manually because there are over 7000 of them!

Thanks, as always,

Kirsten Masse

Posted

Hi,

If those names in the repeating fields are contacts for the Current Record, then it would be rather straightforward to import them, with the option set to create new records for each repetition.

The Current ID would become a ParentID in the new file.

If you mean that each Contact in the repeating field already has an ID stored in another repetition (same rank), then I'd suggest you create an additional field cCompound = IDRep &"|"& NameRep, import the file with repeating field being splitted in separate records (uncheck creation of serials there).

Then, once imported, you'd loop from the first to the last and set the ID to the first part of the imported Compound (before the pipe) and the name with the second part.

HTH

Posted

Dear Ugo:

Don't think I was being clear. I have the same situation as the first poster: 6 different fields, all containing names in a Personnel Assigned File. I am trying to connect the names via a new layout that uses a portal to the Contacts File. Previously, there was no connection between the 6 names, and the Contacts file. Data was manually entered twice.

I have set up the Contacts file to assign a unique ID for each person. Now, I would like to match and mirror the new IDs to the 6 names, so that I can build a relationship btwn Personnel Assigned and Contacts, and list the names in a portal.

Any suggestions?

Kirsten Masse

Posted

Hmm..

So you're saying each Contact has an ID, but that you entered the names into a file with 6 possible Contacts in 6 different fields, without any ID in it.

The problem here would be to make sure any of the name entered is really equal to those entered in the Contact File.

If they both match, then the job might be a little easier.

What you need here would be to transfer these 6 fields in one field set to 6 repetitions.

An easy script would be :

Show All Records

GoToRecord[first]

Loop

SetField[NewRepeat-1;NameField1]

SetField[NewRepeat-2;NameField2]

SetField[NewRepeat-3;NameField3]

SetField[NewRepeat-4;NameField4]

SetField[NewRepeat-5;NameField5]

SetField[NewRepeat-6;NameField6]

GoToRecord[Next-end after last]

End Loop

Then, create a new File, called Assignments.fp5, which would be a join file, with :

serial (auoentered)

CompanyID

ContactName

ContactID

Set the ContactID to be a lookup from a relationship Assignments.fp5:ContactName::Contacts.fp5:ContactName

Now, import the Company File into Assignments, with the option set to split each repeating field into separate records.

The CompanyID will be imported as the key for each contact in that same company.

When done, consider changing the settings, so that the ContactName is filled by a relationship Assignments.fp5:ContactID::Contacts.fp5:ContactID

Now, with this Assignment File, you would either view (and enter new ones) the contacts for one company, from the Company file, or view the Companies (if more than one) from Contacts.fp5 by 2 separate relationships :

- Contacts.fp5:ContactID::Assignments.fp5:ContactID

- Company.fp5:CompanyID::Assignments.fp5:CompanyID

HTH

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