Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I posted this in the import forum, but it's a bit low traffic.

I'm converting an older version of a database into a newer one that we've developed for a non profit doing fundraising.

The old DB has "home phone", "address phone", and "other phone". The new DB has a 5-field array of phone numbers, and a corresponding popup menu with phone types, including fax, work fax, etc.

Is there any way to map the separate fields from the old DB to be imported into the array? Otherwise, I can only import the home phone, essentially. Can someone let me know if this is feasible with FMP, or if I'm going to have to do this manually (yikes)?

Thanks

Posted

If by 5-field array you mean 5 fields, I don't see a problem. Just import and then set the phone type fields with a script. However, if you mean a repeating field with 5 reps, I would set up 5 temporary fields to hold the numbers for the import, then use a script to loop through the records and set them into the repetitions.

Posted

Ok,

I ran a very quick test.

You need a counter say gCounter (num) in this script, that wouldn't show in this layout, and remove the serial from this "Loop layout" so that only the 2 reps in the Tab order defined above are shown.

Show All Records

Go To Record [First]

Go To Layout [Loop]

Loop

GoToField[serial]

SetField[gCounter;0)

Loop

EndLoop If [gCounter = 10]

SetField[gCounter;gCounter+1]

NextField

SetField[ ;

Middle("

Posted

Seems like overkill to me. You can easily set data into field repetitions, just specify e.g.:

Set Field (phone type -1, "home")

Set Field (phone -1, home phone)

Set Field (phone type -2, "work")

Set Field (phone -2, work phone)

etc.

I have to wonder why you want to use repeating fields for this, especially since you're using FM7. You could set up the phone numbers in their own table and be totally flexible.

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