dbTalk Databases Forums  

Repeating and Relationship

comp.databases.filemaker comp.databases.filemaker


Discuss Repeating and Relationship in the comp.databases.filemaker forum.



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

Default Repeating and Relationship - 03-02-2007 , 04:14 AM






Hi guys

I've been working on a FM8.5 database that has 2 tables - Food
Database and Shopping List.

The relationship is the Food Name (the unique identifier). I have the
price of each item in the Food Database and I want to bring that over
for the Shopping List.

In the Shopping List I (so far) have 3 fields, each repeating 10
times ... Food Name , Quantity and Price

Price is a calculation (Quantity * Food Database::Price), but it only
shows the value in the first line. Items 2 - 10 show a 0 value.

I'm sure I'm missing something really simple, but I would appreciate
it if someone could put me out of my misery.

Thanks a lot in advance

Yoshio


Reply With Quote
  #2  
Old   
Warren Peace
 
Posts: n/a

Default Re: Repeating and Relationship - 03-02-2007 , 06:42 AM






Hey Yoshio

The first thing I always check whenever running into a strange problem
with a calculation is the value type that the calculation itself
returns. There should be a drop-down box at the bottom of the
calculation window itself ... make sure it's set to a number!

Hopefully it's as simple as that.

If not, you should also note:
I've run into another type of problem with calculations before where
the calculation field itself became indexed
(storage options for the definition of the field).
If that has happened than your database is storing a value instead of
re-calculating when necessary.

Hope this helps
Best of luck


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

Default Re: Repeating and Relationship - 03-02-2007 , 07:05 AM



Hi Warren

Thanks for replying and I wish it had been as simple as that. I did go
and check these things, since in most cases it is the most simple
things you tend to overlook, but no luck. The result is definitely
number and the calculation is definitely not indexed.

I do get the correct answer for the first input, but not for the other
9. The first field is a value list based on information in the second
table (the Food Name) which I know it looks up okay. What I can't
understand is that everything works in the first line, and not for the
rest.

This is the first time I've really used repeating fields so it is a
learning curb.

Cheers


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

Default Re: Repeating and Relationship - 03-02-2007 , 07:34 AM



A couple of days ago I wrote to Warren the following:

before fmp7 it was very complicated to work with repetitions. Getting data
in and out always remained complex, plus
it is difficult to remember what exactly was stored in which repetition. For
7&8 things are better and one of the ways to use repetitions is storing
graphics for the GUI. But in my opinion storing scans and photo´s (etc) in
repeating fields and then later expecting to use them individualy is asking
for trouble. Just create as many fields as you need, fmp 7 or 8 have no
practicle limit to the number of fields.

Well here you are and bumped into one of the problems with repeating fields.
It looks to me like you will be better of when using relations (A flexible
solution, you can add and delete as many connected records as needed) And
you can do about anything with it, like calculatiing results and total costs

When you need only a very few, fixed number, of options you could also opt
for creating the fields you needed once and add them to your layout.

Keep well, Ursus

"Yoshio" <allanblackey (AT) yahoo (DOT) co.uk> schreef in bericht
news:1172840742.059647.214510 (AT) n33g2000cwc (DOT) googlegroups.com...
Quote:
Hi Warren

Thanks for replying and I wish it had been as simple as that. I did go
and check these things, since in most cases it is the most simple
things you tend to overlook, but no luck. The result is definitely
number and the calculation is definitely not indexed.

I do get the correct answer for the first input, but not for the other
9. The first field is a value list based on information in the second
table (the Food Name) which I know it looks up okay. What I can't
understand is that everything works in the first line, and not for the
rest.

This is the first time I've really used repeating fields so it is a
learning curb.

Cheers




Reply With Quote
  #5  
Old   
NScheffey
 
Posts: n/a

Default Re: Repeating and Relationship - 03-02-2007 , 08:07 AM



On Mar 2, 8:34 am, "Ursus" <ursus.k... (AT) wanadoo (DOT) nl> wrote:
Quote:
A couple of days ago I wrote to Warren the following:

before fmp7 it was very complicated to work with repetitions. Getting data
in and out always remained complex, plus
it is difficult to remember what exactly was stored in which repetition. For
7&8 things are better and one of the ways to use repetitions is storing
graphics for the GUI. But in my opinion storing scans and photo´s (etc)in
repeating fields and then later expecting to use them individualy is asking
for trouble. Just create as many fields as you need, fmp 7 or 8 have no
practicle limit to the number of fields.

Well here you are and bumped into one of the problems with repeating fields.
It looks to me like you will be better of when using relations (A flexible
solution, you can add and delete as many connected records as needed) And
you can do about anything with it, like calculatiing results and total costs

When you need only a very few, fixed number, of options you could also opt
for creating the fields you needed once and add them to your layout.

Keep well, Ursus

"Yoshio" <allanblac... (AT) yahoo (DOT) co.uk> schreef in berichtnews:1172840742.059647.214510 (AT) n33g2000cwc (DOT) googlegroups.com...

Hi Warren

Thanks for replying and I wish it had been as simple as that. I did go
and check these things, since in most cases it is the most simple
things you tend to overlook, but no luck. The result is definitely
number and the calculation is definitely not indexed.

I do get the correct answer for the first input, but not for the other
9. The first field is a value list based on information in the second
table (the Food Name) which I know it looks up okay. What I can't
understand is that everything works in the first line, and not for the
rest.

This is the first time I've really used repeating fields so it is a
learning curb.

Cheers
Try changing your calculation to (Quantity * Extend(Food
Database::Price)) and see if that helps.
Nate



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

Default Re: Repeating and Relationship - 03-02-2007 , 08:13 AM



Quote:
Try changing your calculation to (Quantity * Extend(Food
Database::Price)) and see if that helps.
Nate
Hi

Thanks for this tip. I've tried that ... the figures are no longer 0,
but it changes them all to the price of the last entry.

So if I have three different entries for example, the only one that is
now correct is the third. The first and second have the same prices.
Still we seem to be moving in the direction, so thank you for your
help. I'll keep plugging away and if I find a solution as well, I'll
let you all know.

Thanks again



Reply With Quote
  #7  
Old   
NScheffey
 
Posts: n/a

Default Re: Repeating and Relationship - 03-02-2007 , 08:24 AM



On Mar 2, 9:07 am, "NScheffey" <NSchef... (AT) gmail (DOT) com> wrote:
Quote:
On Mar 2, 8:34 am, "Ursus" <ursus.k... (AT) wanadoo (DOT) nl> wrote:



A couple of days ago I wrote to Warren the following:

before fmp7 it was very complicated to work with repetitions. Getting data
in and out always remained complex, plus
it is difficult to remember what exactly was stored in which repetition.. For
7&8 things are better and one of the ways to use repetitions is storing
graphics for the GUI. But in my opinion storing scans and photo´s (etc) in
repeating fields and then later expecting to use them individualy is asking
for trouble. Just create as many fields as you need, fmp 7 or 8 have no
practicle limit to the number of fields.

Well here you are and bumped into one of the problems with repeating fields.
It looks to me like you will be better of when using relations (A flexible
solution, you can add and delete as many connected records as needed) And
you can do about anything with it, like calculatiing results and total costs

When you need only a very few, fixed number, of options you could also opt
for creating the fields you needed once and add them to your layout.

Keep well, Ursus

"Yoshio" <allanblac... (AT) yahoo (DOT) co.uk> schreef in berichtnews:1172840742.059647.214510 (AT) n33g2000cwc (DOT) googlegroups.com...

Hi Warren

Thanks for replying and I wish it had been as simple as that. I did go
and check these things, since in most cases it is the most simple
things you tend to overlook, but no luck. The result is definitely
number and the calculation is definitely not indexed.

I do get the correct answer for the first input, but not for the other
9. The first field is a value list based on information in the second
table (the Food Name) which I know it looks up okay. What I can't
understand is that everything works in the first line, and not for the
rest.

This is the first time I've really used repeating fields so it is a
learning curb.

Cheers

Try changing your calculation to (Quantity * Extend(Food
Database::Price)) and see if that helps.
Nate
Actually, now that I think about it, that probably won't produce the
results you are looking for, and will instead match the first FoodName
value with each repeating field. I think Ursus is right and the
problem here is repeating fields in general. Instead you need a
portal, and split your Shopping List into separate records. The
relationship should work correctly then.
Nate



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.