dbTalk Databases Forums  

How do repeating fields work?

comp.databases.filemaker comp.databases.filemaker


Discuss How do repeating fields work? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Flower Gardener
 
Posts: n/a

Default How do repeating fields work? - 07-18-2007 , 03:04 PM






I am trying to use a repeating field to do a cross-tab report but I cannot
figure out how to fill it. My table has one column called "product name". I
set up a field to convert the product number to a numerical index thinking
that I need this index to step into the repeating field.. Thus:

ProductCode=
CASE(Product Name="42399",1, Product Name="52233",2, etc)

How would I use this field in the definition of the repeating field? Does
the following definition of the repeating field make sense?
ProductRepeatField=
CASE(ProductCode, Qty)
where Qty is the amount field in the current record being read from the
input table.

As Filemaker steps through the table, I am thinking that it should determine
the index number then use that to reference the position in the repeating
field and drop Qty into it. Will the Qty be accumulated or will it replace
the current value?



Reply With Quote
  #2  
Old   
Bill
 
Posts: n/a

Default Re: How do repeating fields work? - 07-18-2007 , 04:04 PM






In article <Anuni.13584$iN.5772 (AT) newsfe12 (DOT) lga>,
"Flower Gardener" <ngeti (AT) optonline (DOT) net> wrote:

Quote:
I am trying to use a repeating field to do a cross-tab report but I cannot
figure out how to fill it. My table has one column called "product name". I
set up a field to convert the product number to a numerical index thinking
that I need this index to step into the repeating field.. Thus:

ProductCode=
CASE(Product Name="42399",1, Product Name="52233",2, etc)

How would I use this field in the definition of the repeating field? Does
the following definition of the repeating field make sense?
ProductRepeatField=
CASE(ProductCode, Qty)
where Qty is the amount field in the current record being read from the
input table.

As Filemaker steps through the table, I am thinking that it should determine
the index number then use that to reference the position in the repeating
field and drop Qty into it. Will the Qty be accumulated or will it replace
the current value?
It's not clear to me why you would want to use repeating fields for
this, rather than using a separate product table. That would have fields
for product ID, product name, and other details about the product, which
could them be used in a relationship with a line Items table for orders,
invoices, etc.

--
For email, change <fake> to <earthlink>
Bill Collins


Reply With Quote
  #3  
Old   
Flower Gardener
 
Posts: n/a

Default Re: How do repeating fields work? - 07-18-2007 , 09:16 PM



I wanted to do a cross-tab report and several people suggested using
repeating fields. There was an example on the Internet showing how to do it
for Filemaker version higher than the one I have.

But now my interest is piqued and I want to learn more about repeating
fields. But your point is taken; I can do the same thing using a separate
table but with more work.

"Bill" <bbcollins (AT) fake (DOT) net> wrote


Quote:
It's not clear to me why you would want to use repeating fields for
this, rather than using a separate product table. That would have fields
for product ID, product name, and other details about the product, which
could them be used in a relationship with a line Items table for orders,
invoices, etc.




Reply With Quote
  #4  
Old   
Ursus
 
Posts: n/a

Default Re: How do repeating fields work? - 07-19-2007 , 03:26 AM




"Flower Gardener" <ngeti (AT) optonline (DOT) net> schreef in bericht
news:ZPzni.15053$xe1.10543 (AT) newsfe12 (DOT) lga...
Quote:
I wanted to do a cross-tab report and several people suggested using
repeating fields. There was an example on the Internet showing how to do it
for Filemaker version higher than the one I have.

But now my interest is piqued and I want to learn more about repeating
fields. But your point is taken; I can do the same thing using a separate
table but with more work.

Well, that remains to be seen. (The 'more work' bit). As soon as you want to
do ANYTHING with the data inside the repetitions you will think otherwise.
Generaly speeking any kind of related table is to be preferred. I only use
repeats in very specific solutions. Like static display of GUI items. The
main problem is that there is no way to know what data resides in which
repetition. And even if you do know it is hard to retrieve the data you
need, it is hard to re-sort the data once entered. Say you sort on a date
field how would also sort all the other items in different repeatfields. Say
you enter all books sold on a certain day, next day a user wants to bring
back his copy. How would you find the repeat for this book? How would you
delete, or move the item? Then what would you do with the empty repeat? All
very complicated to do with repeats and very easy to do with relationships.

You say you have an older version, but you don't state which older version.
But anything before 7 is even more complicated because the best functions
for using repeats only came with 7.

So if only for displaying items you could do it, but how would you get all
those repeats filled with data that might change. V7 can do that. With some
work.

Once repeats where the first way to store some sort of related data. All
books sold on one day into one field. This was before FMP was related. Then
relations came about, but for compatibility they just never removed the
repeats. Then the users started to complain so loud that with V7 a couple of
new functions where introduced. While this makes repeats more useable, I
still will avoid them if I can.

Hope I haven't scared you too much.... :-)

Keep well, Ursus




Reply With Quote
  #5  
Old   
Flower Gardener
 
Posts: n/a

Default Re: How do repeating fields work? - 07-19-2007 , 10:03 AM



Thanks for your comments. My version of FMP is 5.5. You have steered me away
from repeating fields. I found a note on a chat room where someone made the
same kind of remarks about repeating fields and got thoroughly bashed by a
self-proclaimed guru.

Now I have to figure out how to create a cross-tab report using an auxiliary
table. If I want 13 crosstab report columns, would I create 13 fields in
this table and then sum the corresponding data from input records into these
fields?

"Ursus" <ursus.kirk (AT) wanadoo (DOT) nl> wrote

Quote:
"Flower Gardener" <ngeti (AT) optonline (DOT) net> schreef in bericht
news:ZPzni.15053$xe1.10543 (AT) newsfe12 (DOT) lga...
I wanted to do a cross-tab report and several people suggested using
repeating fields. There was an example on the Internet showing how to do
it for Filemaker version higher than the one I have.

But now my interest is piqued and I want to learn more about repeating
fields. But your point is taken; I can do the same thing using a separate
table but with more work.


Well, that remains to be seen. (The 'more work' bit). As soon as you want
to do ANYTHING with the data inside the repetitions you will think
otherwise. Generaly speeking any kind of related table is to be preferred.
I only use repeats in very specific solutions. Like static display of GUI
items. The main problem is that there is no way to know what data resides
in which repetition. And even if you do know it is hard to retrieve the
data you need, it is hard to re-sort the data once entered. Say you sort
on a date field how would also sort all the other items in different
repeatfields. Say you enter all books sold on a certain day, next day a
user wants to bring back his copy. How would you find the repeat for this
book? How would you delete, or move the item? Then what would you do with
the empty repeat? All very complicated to do with repeats and very easy to
do with relationships.

You say you have an older version, but you don't state which older
version. But anything before 7 is even more complicated because the best
functions for using repeats only came with 7.

So if only for displaying items you could do it, but how would you get all
those repeats filled with data that might change. V7 can do that. With
some work.

Once repeats where the first way to store some sort of related data. All
books sold on one day into one field. This was before FMP was related.
Then relations came about, but for compatibility they just never removed
the repeats. Then the users started to complain so loud that with V7 a
couple of new functions where introduced. While this makes repeats more
useable, I still will avoid them if I can.

Hope I haven't scared you too much.... :-)

Keep well, Ursus




Reply With Quote
  #6  
Old   
Ursus
 
Posts: n/a

Default Re: How do repeating fields work? - 07-20-2007 , 03:39 AM




"Flower Gardener" <ngeti (AT) optonline (DOT) net> schreef in bericht
news:t3Lni.11$fQ2.4 (AT) newsfe12 (DOT) lga...
Quote:
Thanks for your comments. My version of FMP is 5.5. You have steered me
away from repeating fields. I found a note on a chat room where someone
made the same kind of remarks about repeating fields and got thoroughly
bashed by a self-proclaimed guru.

Now I have to figure out how to create a cross-tab report using an
auxiliary table. If I want 13 crosstab report columns, would I create 13
fields in this table and then sum the corresponding data from input
records into these fields?

I think you want to count the amount of something. Right? Lets say you have
a book in your inventory that is either bound or paperback. And you want to
count the number of bound copies and count the number of paperpack copies.
(Each copy would be a record). For this simple looking task there are two
options. You have to look into summary reports (sorted on a field), or
create a lot of extra fields (for this simple example an extra of at least
four fields). Depending on your needs. Filemaker is not a real good number
cruncher. If there are lots of statistics involved you might need a
spreadsheet for the crunching. But let us know if you think I understood
your needs.

Ursus




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.