Duplicating child set

  • Follow


Hi FileMaker Folks -

In an unusual scenario, I find that it would be nice to duplicate a set 
of child records when I duplicate a record in the parent DB.  I'm using 
FMPro6 on a LAN that mixes Macs and Windows PCs, with my solution hosted 
by FMServer6.  Scripted Export and Import, and also scripted Replace, 
are not very desirable in this environment.  Does anyone have a favorite 
method of creating a duplicate set of child records that would be 
efficient in my situation?  Perhaps by looping?

Any discussion very much appreciated in advance!

Thanks as always -
James

0
Reply James 3/12/2005 6:31:40 AM

In article <g1wYd.36328$VD5.30998@twister.socal.rr.com>,
 James <junspambusch@hawaii.rr.unspam.com> wrote:

> Hi FileMaker Folks -
> 
> In an unusual scenario, I find that it would be nice to duplicate a set 
> of child records when I duplicate a record in the parent DB.  I'm using 
> FMPro6 on a LAN that mixes Macs and Windows PCs, with my solution hosted 
> by FMServer6.  Scripted Export and Import, and also scripted Replace, 
> are not very desirable in this environment.  Does anyone have a favorite 
> method of creating a duplicate set of child records that would be 
> efficient in my situation?  Perhaps by looping?
> 
> Any discussion very much appreciated in advance!
> 
> Thanks as always -
> James

It might help people answer your question if they understand why you 
want to create a duplicate of the child records.

Bill

-- 
To send e-mail, remove .invalid
0
Reply B 3/12/2005 2:48:11 PM


James wrote:
> Hi FileMaker Folks -
> 
> In an unusual scenario, I find that it would be nice to duplicate a set 
> of child records when I duplicate a record in the parent DB.  I'm using 
> FMPro6 on a LAN that mixes Macs and Windows PCs, with my solution hosted 
> by FMServer6.  Scripted Export and Import, and also scripted Replace, 
> are not very desirable in this environment.  Does anyone have a favorite 
> method of creating a duplicate set of child records that would be 
> efficient in my situation?  Perhaps by looping?
> 
> Any discussion very much appreciated in advance!
> 
> Thanks as always -
> James
> 

Hi,

Scripted export and import is something I would have recommended. I can 
understand that it may not be convenient in a server environment, but 
actually I'm not sure if it's really a non-starter or just a matter of 
being cautious with a few things. Maybe I'm missing something obvious, 
though.
A looping script seems like a likely alternative.

Marc-Andr� Paiement
0
Reply ISO 3/12/2005 10:47:18 PM

Hi Marc-Andre and B Collins -

And thanks very much for your replies.  In answer to B Collins' 
question, our solution tracks tasks (about 30 fields) and the steps 
(about 10 fields) associated with those tasks.  We enter new tasks and 
add steps, then check the steps off as they are accomplished.  Anyone on 
the LAN can see the progress of any task at any time.  It works great, 
but sometimes we need to add a new task that is very similar to a 
previous task.  It's easy enough to do by duplicating the record for the 
previous task and changing the unique identifier, but it would save a 
lot of work to duplicate the steps also and give the new child set of 
steps the new identifier.

I have experimented with Export/Import scripts and Replace scripts, and 
they can be made to work, but as Marc-Andre notes, they require caution 
and have caveats.  I can't be sure of much discipline on the part of the 
users here.  So I have concentrated on a looping script and am happy to 
say that it's working out well.

Thanks very much again for the helpful responses!

James

Marc-Andr� Paiement wrote:
> James wrote:
> 
>> Hi FileMaker Folks -
>>
>> In an unusual scenario, I find that it would be nice to duplicate a 
>> set of child records when I duplicate a record in the parent DB.  I'm 
>> using FMPro6 on a LAN that mixes Macs and Windows PCs, with my 
>> solution hosted by FMServer6.  Scripted Export and Import, and also 
>> scripted Replace, are not very desirable in this environment.  Does 
>> anyone have a favorite method of creating a duplicate set of child 
>> records that would be efficient in my situation?  Perhaps by looping?
>>
>> Any discussion very much appreciated in advance!
>>
>> Thanks as always -
>> James
>>
> 
> Hi,
> 
> Scripted export and import is something I would have recommended. I can 
> understand that it may not be convenient in a server environment, but 
> actually I'm not sure if it's really a non-starter or just a matter of 
> being cautious with a few things. Maybe I'm missing something obvious, 
> though.
> A looping script seems like a likely alternative.
> 
> Marc-Andr� Paiement
> 

0
Reply James 3/13/2005 3:33:17 AM

I often do what you want with the following:

 From the parent record:
Go to Related Records [Children; Show Only Related]
Duplicate Record
Set Field [Child::Global; RecordID]
Perform Script [External; "ChildFile.fp5"]

 From the child file:
Go to record [First]
Loop
   Exit loop if [status(currentfoundcount) = 0]
   Duplicate Record
   Set Field [ParentID; Global]
   Omit Record
   Go to Record [First]
   Omit Record
End Loop


James wrote:
> Hi Marc-Andre and B Collins -
> 
> And thanks very much for your replies.  In answer to B Collins' 
> question, our solution tracks tasks (about 30 fields) and the steps 
> (about 10 fields) associated with those tasks.  We enter new tasks and 
> add steps, then check the steps off as they are accomplished.  Anyone on 
> the LAN can see the progress of any task at any time.  It works great, 
> but sometimes we need to add a new task that is very similar to a 
> previous task.  It's easy enough to do by duplicating the record for the 
> previous task and changing the unique identifier, but it would save a 
> lot of work to duplicate the steps also and give the new child set of 
> steps the new identifier.
> 
> I have experimented with Export/Import scripts and Replace scripts, and 
> they can be made to work, but as Marc-Andre notes, they require caution 
> and have caveats.  I can't be sure of much discipline on the part of the 
> users here.  So I have concentrated on a looping script and am happy to 
> say that it's working out well.
> 
> Thanks very much again for the helpful responses!
> 
> James
> 
> Marc-Andr� Paiement wrote:
> 
>> James wrote:
>>
>>> Hi FileMaker Folks -
>>>
>>> In an unusual scenario, I find that it would be nice to duplicate a 
>>> set of child records when I duplicate a record in the parent DB.  I'm 
>>> using FMPro6 on a LAN that mixes Macs and Windows PCs, with my 
>>> solution hosted by FMServer6.  Scripted Export and Import, and also 
>>> scripted Replace, are not very desirable in this environment.  Does 
>>> anyone have a favorite method of creating a duplicate set of child 
>>> records that would be efficient in my situation?  Perhaps by looping?
>>>
>>> Any discussion very much appreciated in advance!
>>>
>>> Thanks as always -
>>> James
>>>
>>
>> Hi,
>>
>> Scripted export and import is something I would have recommended. I 
>> can understand that it may not be convenient in a server environment, 
>> but actually I'm not sure if it's really a non-starter or just a 
>> matter of being cautious with a few things. Maybe I'm missing 
>> something obvious, though.
>> A looping script seems like a likely alternative.
>>
>> Marc-Andr� Paiement
>>
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg              (818) 883-2846
FM Pro Solutions       Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
0
Reply Howard 3/13/2005 5:41:59 PM

Hi Howard -

Thanks much for your suggestion.  I think it's very clever.  I succeeded 
in doing what I wanted by going to the related set, sorting it by serial 
ID, and looping through in much the same way, but I think dumping each 
child record out of the found set as it is duplicated is more elegant. 
I'm going to give it a try.

Thanks again -
James

Howard Schlossberg wrote:
> I often do what you want with the following:
> 
>  From the parent record:
> Go to Related Records [Children; Show Only Related]
> Duplicate Record
> Set Field [Child::Global; RecordID]
> Perform Script [External; "ChildFile.fp5"]
> 
>  From the child file:
> Go to record [First]
> Loop
>   Exit loop if [status(currentfoundcount) = 0]
>   Duplicate Record
>   Set Field [ParentID; Global]
>   Omit Record
>   Go to Record [First]
>   Omit Record
> End Loop
> 
> 
> James wrote:
> 
>> Hi Marc-Andre and B Collins -
>>
>> And thanks very much for your replies.  In answer to B Collins' 
>> question, our solution tracks tasks (about 30 fields) and the steps 
>> (about 10 fields) associated with those tasks.  We enter new tasks and 
>> add steps, then check the steps off as they are accomplished.  Anyone 
>> on the LAN can see the progress of any task at any time.  It works 
>> great, but sometimes we need to add a new task that is very similar to 
>> a previous task.  It's easy enough to do by duplicating the record for 
>> the previous task and changing the unique identifier, but it would 
>> save a lot of work to duplicate the steps also and give the new child 
>> set of steps the new identifier.
>>
>> I have experimented with Export/Import scripts and Replace scripts, 
>> and they can be made to work, but as Marc-Andre notes, they require 
>> caution and have caveats.  I can't be sure of much discipline on the 
>> part of the users here.  So I have concentrated on a looping script 
>> and am happy to say that it's working out well.
>>
>> Thanks very much again for the helpful responses!
>>
>> James
>>
>> Marc-Andr� Paiement wrote:
>>
>>> James wrote:
>>>
>>>> Hi FileMaker Folks -
>>>>
>>>> In an unusual scenario, I find that it would be nice to duplicate a 
>>>> set of child records when I duplicate a record in the parent DB.  
>>>> I'm using FMPro6 on a LAN that mixes Macs and Windows PCs, with my 
>>>> solution hosted by FMServer6.  Scripted Export and Import, and also 
>>>> scripted Replace, are not very desirable in this environment.  Does 
>>>> anyone have a favorite method of creating a duplicate set of child 
>>>> records that would be efficient in my situation?  Perhaps by looping?
>>>>
>>>> Any discussion very much appreciated in advance!
>>>>
>>>> Thanks as always -
>>>> James
>>>>
>>>
>>> Hi,
>>>
>>> Scripted export and import is something I would have recommended. I 
>>> can understand that it may not be convenient in a server environment, 
>>> but actually I'm not sure if it's really a non-starter or just a 
>>> matter of being cautious with a few things. Maybe I'm missing 
>>> something obvious, though.
>>> A looping script seems like a likely alternative.
>>>
>>> Marc-Andr� Paiement
>>>
>>
> 

0
Reply James 3/15/2005 1:19:11 AM

5 Replies
202 Views

(page loaded in 0.218 seconds)

Similiar Articles:











7/29/2012 4:30:07 PM


Reply: