Case ( Catalogs::Division = "Core"; Catalogs::Page Count * 395 ;
Catalogs::Division = "Intl"; Catalogs::Page Count * 243;
I see nothing wrong in the syntax of that function.
That's what I was afraid of, so it must have something to do with my relationship between the two tables. Any ideas? Obviously one table is called Catalogs, the other is Media.
Check point, the field is set up as a calculation with display as number selected. So I think I'm ok in terms of the field set up. Next check point?
I only see a reference to the Catalogs table in the expression. How is Media related to Catalog?
Is this calculation field defined in media or calculation?
How is this failing? Blank field? Wrong Value? Value doesn't update correctly?
Is this a number field with the above expression entered as it's auto-enter calculation or is it a field of type calculation with Number specified as its return type?
To be more clear it is table Premedia (this was needed if you do look at the word doc). Can I send you a word doc?
It is defined in Media.
Field of type calculation with Number specified as the return type.
You can upload the doc to a file share site and post the download link here.
Why not define this in Catalog?
Defined in Media ( or Premedia ) this calculation will refer to the first related record in Catalog and will be an unstored calculation.
I guess there isn't a good answer for that other than there are already 362 (yes 362) fields in catalogs. This information is being used by an entirely different department so I thought I would just create a separate table for them. Maybe that is doing it the hard way.
If I can't resolve this by tomorrow morning, I'll send through a share site.
Here's an example that may give you a clue as to why it's not working for you.
Say I have this data in table 1:
Type Qty Price
Apple 2 25
Kiwi 3 43
Apple 1 25
Grape 5 4
In table 2 have have a matching type field for this relationship:
Table 2::Type = Table 1::Type
If I define this calculation field in Table 2:
Qty * Price
And go to or create a record with Apple in the Table 2::Type field...
It will return a value of 50 and the second related record with Type Apple and a Qty of 1 will be ignored as the calculation will only refer to the first related record. (The "first related record" will be the first such record created unless a sort order is defined for the relationship. If there's a sort order specified, whatever record falls first in the relationship's sort order will be teh "first related record".)
That was it Phil!! Thanks!