dbTalk Databases Forums  

Copy data more records to one field in related table

comp.databases.filemaker comp.databases.filemaker


Discuss Copy data more records to one field in related table in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
leon.obers@iae.nl
 
Posts: n/a

Default Copy data more records to one field in related table - 07-28-2005 , 05:58 AM






FM 7.03 - Win XP

Hello,

In one table I have several records containing order numbers belonging
to one name/client.

Mr. Brown - 1234-A
Mr. Brown - 1234-B
Mr. Green - 1235-A
Mr. Green - 1235-B
Mr. Green - 1235-C
Mrs. Red - 1236-A
Mrs. Rose - 1237-A
Mrs. Rose - 1237-B

In a related "paying" table containing unique name records, I do want a
summary of several order numbers. I was playing with a Portal field and
yes all related order numbers are showing up. But it is not the way I
want to use it. Exporting the file for electronic banking, a portal can
not be choosen as a "field" for export.
Furthermore I don't want a row of order numbers but just data in one
line.

Is there a way to copy the contents of a portal to a fieldname?
Or how can I get the data from the first order table of all those
related records in one field to the second related paying table.

Mr. Brown - 1234-A, 1234-B
Mr. Green - 1235-A, 1235-B, 1235-C
Mrs. Red - 1236-A
Mrs. Rose - 1237-A, 1237-A

I could make a difficult "loop" script sorting and searching for each
name in the first table and copy the contents to the other related
"paying" table in one field. It takes much "calculation" time and a
difficult script to run all those records.

Is there not an easy way, just combining the related data to the
"paying" table? Playing I only do get the data of the first related
active record from the first table. How to get the data from the second
related record and more (without script steps) in the same field as
shown above just by a calculation of the field?
Within calculation functions I can not find "next record" functions.

If it is not possible, at least I do want the data showing up in
several fields comparable as a "Portal" but it must be "real" fields so
I can export the data.

Mr. Brown
- 1234-A
- 1234-B

Mr. Green
- 1235-A
- 1235-B
- 1235-C

Mrs. Red
- 1236-A

Mrs. Rose
- 1237-A
- 1237-B



Thanks in advice.

Regards, Léon Obers


Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: Copy data more records to one field in related table - 07-28-2005 , 07:21 AM






leon.obers (AT) iae (DOT) nl wrote:

Quote:
FM 7.03 - Win XP

Hello,

In one table I have several records containing order numbers belonging
to one name/client.

Mr. Brown - 1234-A
Mr. Brown - 1234-B
Mr. Green - 1235-A
Mr. Green - 1235-B
Mr. Green - 1235-C
Mrs. Red - 1236-A
Mrs. Rose - 1237-A
Mrs. Rose - 1237-B

In a related "paying" table containing unique name records, I do want a
summary of several order numbers. I was playing with a Portal field and
yes all related order numbers are showing up. But it is not the way I
want to use it. Exporting the file for electronic banking, a portal can
not be choosen as a "field" for export.
Furthermore I don't want a row of order numbers but just data in one
line.

Is there a way to copy the contents of a portal to a fieldname?
Or how can I get the data from the first order table of all those
related records in one field to the second related paying table.

Mr. Brown - 1234-A, 1234-B
Mr. Green - 1235-A, 1235-B, 1235-C
Mrs. Red - 1236-A
Mrs. Rose - 1237-A, 1237-A

I could make a difficult "loop" script sorting and searching for each
name in the first table and copy the contents to the other related
"paying" table in one field. It takes much "calculation" time and a
difficult script to run all those records.

Is there not an easy way, just combining the related data to the
"paying" table? Playing I only do get the data of the first related
active record from the first table. How to get the data from the second
related record and more (without script steps) in the same field as
shown above just by a calculation of the field?
Within calculation functions I can not find "next record" functions.

If it is not possible, at least I do want the data showing up in
several fields comparable as a "Portal" but it must be "real" fields so
I can export the data.

Mr. Brown
- 1234-A
- 1234-B

Mr. Green
- 1235-A
- 1235-B
- 1235-C

Mrs. Red
- 1236-A

Mrs. Rose
- 1237-A
- 1237-B



Thanks in advice.

Regards, Léon Obers
The portal is convenient for display, but when it comes time to export,
try the Go To Related Record Script step. In the Options, specify which
table and layout you want, and to show only related records.

From there, you have real fields to export, and you already have the
related records as the found set.

Matt


Reply With Quote
  #3  
Old   
David
 
Posts: n/a

Default Re: Copy data more records to one field in related table - 07-28-2005 , 07:34 AM



Matt Wills wrote:
Quote:
leon.obers (AT) iae (DOT) nl wrote:

FM 7.03 - Win XP

Hello,

In one table I have several records containing order numbers
belonging to one name/client.

Mr. Brown - 1234-A
Mr. Brown - 1234-B
Mr. Green - 1235-A
Mr. Green - 1235-B
Mr. Green - 1235-C
Mrs. Red - 1236-A
Mrs. Rose - 1237-A
Mrs. Rose - 1237-B

In a related "paying" table containing unique name records, I do
want a summary of several order numbers. I was playing with a Portal
field and yes all related order numbers are showing up. But it is
not the way I want to use it. Exporting the file for electronic
banking, a portal can not be choosen as a "field" for export.
Furthermore I don't want a row of order numbers but just data in one
line.

Is there a way to copy the contents of a portal to a fieldname?
Or how can I get the data from the first order table of all those
related records in one field to the second related paying table.

Mr. Brown - 1234-A, 1234-B
Mr. Green - 1235-A, 1235-B, 1235-C
Mrs. Red - 1236-A
Mrs. Rose - 1237-A, 1237-A

I could make a difficult "loop" script sorting and searching for each
name in the first table and copy the contents to the other related
"paying" table in one field. It takes much "calculation" time and a
difficult script to run all those records.

Is there not an easy way, just combining the related data to the
"paying" table? Playing I only do get the data of the first related
active record from the first table. How to get the data from the
second related record and more (without script steps) in the same
field as shown above just by a calculation of the field?
Within calculation functions I can not find "next record" functions.

If it is not possible, at least I do want the data showing up in
several fields comparable as a "Portal" but it must be "real" fields
so I can export the data.

Mr. Brown
- 1234-A
- 1234-B

Mr. Green
- 1235-A
- 1235-B
- 1235-C

Mrs. Red
- 1236-A

Mrs. Rose
- 1237-A
- 1237-B



Thanks in advice.

Regards, Léon Obers

The portal is convenient for display, but when it comes time to
export, try the Go To Related Record Script step. In the Options,
specify which table and layout you want, and to show only related
records.
From there, you have real fields to export, and you already have the
related records as the found set.

Matt
An alternative method is to gather the order numbers into a value list
by client and then export with the list sorted and grouped by client.

So make a second ocurrence of the order table relate it to the first by
client name. Then define a value list OrderNumbers, which is the values
of the field order number in the 1 st occurrence include only related
records from the second occurrence. Now define an OrderList in the first
occurrence as a calculation =
ValueListitems(Get(filename);"OrderNumbers") this field will contain a
list of the order numbers separated by carriage returns. Yopu then need
to put that into the format you need and export the table sorted by
Client name and grouped by client name.


--
Dan
Using
FMP7.03, WinXP SP2




Reply With Quote
  #4  
Old   
Léon Obers
 
Posts: n/a

Default Re: Copy data more records to one field in related table - 07-29-2005 , 03:24 AM





Matt Wills wrote:

Quote:
The portal is convenient for display, but when it comes time to export,
try the Go To Related Record Script step. In the Options, specify which
table and layout you want, and to show only related records.

From there, you have real fields to export, and you already have the
related records as the found set.
I tried this solution first (as in opposite of the other written
solution of David), and yes I have it working.

Although for getting the data of several records, still the script is
more wide as in first degree of what I thought by inserting "Loops" and
"go to next record" functions to get all the data of following related
records, as well to handle all the records of the "paying" table itself.
But still more easy because no search options has to be made by the
related records as the found set.

Thanks for your suggestions.



--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.



Reply With Quote
  #5  
Old   
Léon Obers
 
Posts: n/a

Default Re: Copy data more records to one field in related table - 07-29-2005 , 03:28 AM





David wrote:

Quote:
An alternative method is to gather the order numbers into a value list
by client and then export with the list sorted and grouped by client.

So make a second ocurrence of the order table relate it to the first by
client name. Then define a value list OrderNumbers, which is the values
of the field order number in the 1 st occurrence include only related
records from the second occurrence. Now define an OrderList in the first
occurrence as a calculation =
ValueListitems(Get(filename);"OrderNumbers") this field will contain a
list of the order numbers separated by carriage returns. Yopu then need
to put that into the format you need and export the table sorted by
Client name and grouped by client name.
As you can read at my other reaction, I tried the solution of Mat Wills
first (and working). I shall save your information for later use.
Thanks for your suggestion.


--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.



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.