dbTalk Databases Forums  

changing form 4 fields to 4 different records FM7 WinXP

comp.databases.filemaker comp.databases.filemaker


Discuss changing form 4 fields to 4 different records FM7 WinXP in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Claude Carlos
 
Posts: n/a

Default changing form 4 fields to 4 different records FM7 WinXP - 09-20-2005 , 12:12 PM






I have a solution in FM5.5 that is working great but I want to upgrade to FM
7 or FM8.

I think I'm going to recreate everything to take advantage of the new
possibilities

BUT I have a problem....
In the original solution (13 related files) (Client, Services, Billing,etc.)
When I create a new record (bill) for a client, I have on the layout, the
customer info and also the services he purchases. This is where I have a
problem: now the services are in 4 DIFFERENT fields
(Service1, service2, service3, etc). I get the Total amount due by adding
the 4 service fields.

Now I know this is not a good design....
I want to correct that in the new solution by creating a new record in a
table for each service he buys. I'm pretty shure I can manage that part.

Here is my question: How do I import the services from the old version to
the new version since in the old one I have 4 services in the same record
and in the new version I want to have a record for each service.

Hope this i clear enough


Thanks

Claude



Reply With Quote
  #2  
Old   
Lynn allen
 
Posts: n/a

Default Re: changing form 4 fields to 4 different records FM7 WinXP - 09-20-2005 , 01:00 PM






Claude Carlos <carlos.cl (AT) videotron (DOT) ca> wrote:

Quote:
Here is my question: How do I import the services from the old version to
the new version since in the old one I have 4 services in the same record
and in the new version I want to have a record for each service.
Oddly enough, there is a feature in FM that will make this easier for
you.

Make a repeating field with four repeats. Create a script that will:

Loop
Set Field (repeatingfieldname, [1], Service1)
Set Field (repeatingfieldname, [2], Service2)
do other 2 fields into repeats 3 & 4
Go to next record, exit after last
End loop

That number in brackets is the repetition number, you select that in the
choose field dialog, at the bottom. Once you get all your values into
the repeating field, and creating your child file to receive the
services, you can import the records into the child file.

When you are importing, choose the option to "Split repeating fields
into separate records", and match your fields.

Now, you'll have one child record for each filled repeat, with the
BillID on each one. You can create the relationship from Billing to
Services and show the child records in a portal. Then delete the repeats
and your old Servicex4 fields.

Lynn Allen
--
Allen & Allen Semiotics www.semiotics.com
FSA Associate Filemaker Design & Consulting


Reply With Quote
  #3  
Old   
Claude Carlos
 
Posts: n/a

Default Re: changing form 4 fields to 4 different records FM7 WinXP - 09-20-2005 , 03:06 PM



Thanks Lynn I'll give that a try.
It sounds a lot less complicated then I anticipated


"Lynn allen" <lynn (AT) NOT-semiotics (DOT) com> a écrit dans le message de news:
1h36p0v.1xvf9kd1wuagoiN%lynn (AT) NOT-semiotics (DOT) com...
Quote:
Claude Carlos <carlos.cl (AT) videotron (DOT) ca> wrote:

Here is my question: How do I import the services from the old version
to
the new version since in the old one I have 4 services in the same record
and in the new version I want to have a record for each service.

Oddly enough, there is a feature in FM that will make this easier for
you.

Make a repeating field with four repeats. Create a script that will:

Loop
Set Field (repeatingfieldname, [1], Service1)
Set Field (repeatingfieldname, [2], Service2)
do other 2 fields into repeats 3 & 4
Go to next record, exit after last
End loop

That number in brackets is the repetition number, you select that in the
choose field dialog, at the bottom. Once you get all your values into
the repeating field, and creating your child file to receive the
services, you can import the records into the child file.

When you are importing, choose the option to "Split repeating fields
into separate records", and match your fields.

Now, you'll have one child record for each filled repeat, with the
BillID on each one. You can create the relationship from Billing to
Services and show the child records in a portal. Then delete the repeats
and your old Servicex4 fields.

Lynn Allen
--
Allen & Allen Semiotics www.semiotics.com
FSA Associate Filemaker Design & Consulting



Reply With Quote
  #4  
Old   
Lynn allen
 
Posts: n/a

Default Re: changing form 4 fields to 4 different records FM7 WinXP - 09-20-2005 , 08:01 PM



Claude Carlos <carlos.cl (AT) videotron (DOT) ca> wrote:

Quote:
Thanks Lynn I'll give that a try.
It sounds a lot less complicated then I anticipated
Well, I should also have said (it was a late night last night and not
enough sleep) that you'll need a repeating field for each field in your
services, if you have separate price, quantity and description fields,
or tax fields or such. Gather all the data that needs to be split into
repeats.

Then in your child file, there are NO repeating fields, just the single
Price, Quantity, Description fields, and you match the repeaters in the
parent file to the single fields in the child file.

There, now I feel better. TIme for a nap?

Lynn Allen
--
Allen & Allen Semiotics www.semiotics.com
FSA Associate Filemaker Design & Consulting


Reply With Quote
  #5  
Old   
Claude Carlos
 
Posts: n/a

Default Re: changing form 4 fields to 4 different records FM7 WinXP - 09-20-2005 , 09:11 PM



Thanks
I already did that , (repeating field for each field)

Thanks again

Get some rest now..

Claude
"Lynn allen" <lynn (AT) NOT-semiotics (DOT) com> a écrit dans le message de news:
1h378lt.50z3tpqbaerkN%lynn (AT) NOT-semiotics (DOT) com...
Quote:
Claude Carlos <carlos.cl (AT) videotron (DOT) ca> wrote:

Thanks Lynn I'll give that a try.
It sounds a lot less complicated then I anticipated

Well, I should also have said (it was a late night last night and not
enough sleep) that you'll need a repeating field for each field in your
services, if you have separate price, quantity and description fields,
or tax fields or such. Gather all the data that needs to be split into
repeats.

Then in your child file, there are NO repeating fields, just the single
Price, Quantity, Description fields, and you match the repeaters in the
parent file to the single fields in the child file.

There, now I feel better. TIme for a nap?

Lynn Allen
--
Allen & Allen Semiotics www.semiotics.com
FSA Associate Filemaker Design & Consulting



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.