dbTalk Databases Forums  

Relation not refreshed after change in calculated field

comp.databases.filemaker comp.databases.filemaker


Discuss Relation not refreshed after change in calculated field in the comp.databases.filemaker forum.



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

Default Relation not refreshed after change in calculated field - 10-11-2009 , 02:12 PM






This problem involves 3 files with tables:

System System
Teachers Teachers
Contracts Appointments

One table in file 'System' has a field 'WorkingYear'

A field in table 'Teachers' calculates a copy of System::Workingyear

A TO for 'Teachers' in a file 'Contracts' uses 3 fields to get acces
via a relation to a table 'Appointments'.
One of these fields is the calculated field with a copy of
'System::WorkingYear'

A layout for 'Teachers' in this file 'Contracts' contains a portal
for 'Appointments'

When the System::WorkingYear field is changed, the copy in the
Teachers file is updated accordingly,
but the relation to Appointments is not updated.

All the calculation fields are unstored.

What rule in the FM documentation did I miss?

So I am looking to related records by a set of 3 values, one of these
is a calculated field.
Changing the target of the calculated field does not update the set of
related records.

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

Default Re: Relation not refreshed after change in calculated field - 10-11-2009 , 07:12 PM






In article
<b95420ec-9cdd-482c-ab88-780d0d123ca5 (AT) c3g2000yqd (DOT) googlegroups.com>,
Gert <zyxyqyx (AT) gmail (DOT) com> wrote:

Quote:
This problem involves 3 files with tables:

System System
Teachers Teachers
Contracts Appointments

One table in file 'System' has a field 'WorkingYear'

A field in table 'Teachers' calculates a copy of System::Workingyear

A TO for 'Teachers' in a file 'Contracts' uses 3 fields to get acces
via a relation to a table 'Appointments'.
One of these fields is the calculated field with a copy of
'System::WorkingYear'

A layout for 'Teachers' in this file 'Contracts' contains a portal
for 'Appointments'

When the System::WorkingYear field is changed, the copy in the
Teachers file is updated accordingly,
but the relation to Appointments is not updated.

All the calculation fields are unstored.

What rule in the FM documentation did I miss?

So I am looking to related records by a set of 3 values, one of these
is a calculated field.
Changing the target of the calculated field does not update the set of
related records.
You say Teachers has a copy of System::WorkingYear. From your
description it sounds like that is a calculation field, with the formula
Teachers::WorkingYear = System::WorkingYear.

I gather Contracts also has also has a field of its own
Contracts::WorkingYear.

You have set up a relationship
Teachers::WorkingYear = Contracts::WorkingYear

However, Teachers::WorkingYear is a calculation field with its value
based on another table.

Therefore Teachers::WorkingYear cannot be indexed. To work as a key
field in a relationship a field has to be capable of being indexed.
Therefore Teachers::WorkingYear cannot serve as a relationship key field.

For the relationship to work, Teachers::WorkingYear has to hold a fixed
value. Its value can be set by a script, and then the relationship will
work.

Reply With Quote
  #3  
Old   
Your Name
 
Posts: n/a

Default Re: Relation not refreshed after change in calculated field - 10-11-2009 , 07:20 PM



"Gert" <zyxyqyx (AT) gmail (DOT) com> wrote

Quote:
This problem involves 3 files with tables:

System System
Teachers Teachers
Contracts Appointments

One table in file 'System' has a field 'WorkingYear'

A field in table 'Teachers' calculates a copy of System::Workingyear

A TO for 'Teachers' in a file 'Contracts' uses 3 fields to get acces
via a relation to a table 'Appointments'.
One of these fields is the calculated field with a copy of
'System::WorkingYear'

A layout for 'Teachers' in this file 'Contracts' contains a portal
for 'Appointments'

When the System::WorkingYear field is changed, the copy in the
Teachers file is updated accordingly,
but the relation to Appointments is not updated.

All the calculation fields are unstored.

What rule in the FM documentation did I miss?

So I am looking to related records by a set of 3 values, one of these
is a calculated field.
Changing the target of the calculated field does not update the set of
related records.
Are you sure the records are related properly by the correct data? It could
be that the Appointments records are related to different System records
then the one you're changing the date in.


Helpfull Harry )

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

Default Re: Relation not refreshed after change in calculated field - 10-12-2009 , 04:48 AM



A more detailed description of the configuration:
---------------------------------------------------------------------------------------------------------
#File System

System::WorkingYear

---------------------------------------------------------------------------------------------------------
#File Teachers:
Teachers::cWorkingYearCopy --> Contracts:Appointments::Year
(numeric)


---------------------------------------------------------------------------------------------------------
#File Contracts:

TO Teachers
TO Appointments

A relation Teachers --> Appointments

Teachers::cWorkingYearCopy --> Contracts:Appointments::Year
(numeric)
Teachers::ContractId -->
Contracts:Appointments::ContractId (numeric)
Teachers::gAppointmentType --> Contracts:Appointments::Type
(Text)
---------------------------------------------------------------------------------------------------------

A portal in the file 'Contracts' on a layout for Teachers shows
records for this relation.

When the System::WorkingYear field is changed on another layout,
the copy in the Teachers file is updated accordingly, but the
relation to Appointments is not updated to use this new value.
Even when the the window+portal is refreshed after visiting other
Teacher- records.

The relation selects records for the ContractId of each Teacher, but
not for the new WorkingYear.

After closing and re-opening the files however, the correct value for
WorkingYear is used.

(FM8, FM10 on windows )

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

Default Re: Relation not refreshed after change in calculated field - 10-12-2009 , 04:57 AM



A more detailed description of the configuration:
---------------------------------------------------------------------------------------------------------
#File System

System::WorkingYear

---------------------------------------------------------------------------------------------------------
#File Teachers:
Teachers::cWorkingYearCopy = System::Year (numeric)


---------------------------------------------------------------------------------------------------------
#File Contracts:

TO Teachers
TO Appointments

A relation Teachers --> Appointments

Teachers::cWorkingYearCopy --> Contracts:Appointments::Year
(numeric)
Teachers::ContractId -->
Contracts:Appointments::ContractId (numeric)
Teachers::gAppointmentType --> Contracts:Appointments::Type
(Text)
---------------------------------------------------------------------------------------------------------

A portal in the file 'Contracts' on a layout for Teachers shows
records for this relation.

When the System::WorkingYear field is changed on another layout,
the copy in the Teachers file is updated accordingly, but the
relation to Appointments is not updated to use this new value.
Even when the the window+portal is refreshed after visiting other
Teacher- records.

The relation selects records for the ContractId of each Teacher, but
not for the new WorkingYear.

After closing and re-opening the files however, the correct value for
WorkingYear is used.

(FM8, FM10 on windows )

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

Default Re: Relation not refreshed after change in calculated field - 10-12-2009 , 05:00 AM



A more detailed description of the configuration:
---------------------------------------------------------------------------------------------------------
#File System

System::WorkingYear

---------------------------------------------------------------------------------------------------------
#File Teachers:
Teachers::cWorkingYearCopy = System::WorkingYear (numeric)


---------------------------------------------------------------------------------------------------------
#File Contracts:

TO Teachers
TO Appointments

A relation Teachers --> Appointments

Teachers::cWorkingYearCopy --> Contracts:Appointments::Year
(numeric)
Teachers::ContractId -->
Contracts:Appointments::ContractId (numeric)
Teachers::gAppointmentType --> Contracts:Appointments::Type
(Text)
---------------------------------------------------------------------------------------------------------

A portal in the file 'Contracts' on a layout for Teachers shows
records for this relation.

When the System::WorkingYear field is changed on another layout,
the copy in the Teachers file is updated accordingly, but the
relation to Appointments is not updated to use this new value.
Even when the the window+portal is refreshed after visiting other
Teacher- records.

The relation selects records for the ContractId of each Teacher, but
not for the new WorkingYear.

After closing and re-opening the files however, the correct value for
WorkingYear is used.

(FM8, FM10 on windows )

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.