![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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. |
#4
| |||
| |||
|
|
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. |
#5
| |||
| |||
|
|
"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 |
#6
| |||
| |||
|
|
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? |
![]() |
| Thread Tools | |
| Display Modes | |
| |