dbTalk Databases Forums  

changing field content of ID related fields

comp.databases.filemaker comp.databases.filemaker


Discuss changing field content of ID related fields in the comp.databases.filemaker forum.



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

Default changing field content of ID related fields - 11-28-2006 , 05:05 AM






Hello together,

I am using FM 7. I am working with related tables for my database. In
one of these tables I have fields related to an automatic ID. If I
want to change the content of the ID-related field the new content will
not be seen in all records but only in those who are created after the
change.

e.g. field NAME content = Smith ID = 32 changing field content from
Smith to Johnson has only affect in new records but I want this change
happens in all records. The old "name" is no longer valid and needed.


Thank's for your help
Dagmar


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

Default Re: changing field content of ID related fields - 11-28-2006 , 07:58 AM






Dagmar,

Normally I won't re-use an ID. Basicaly when Smith is not here any more and
the record not valid, I either move wmith to a seperate table. (Ex-employee)
OR I delete the record completely. An ID would never hold anymore then one
value.
For Johnson I would create a new record and thus a new ID.

To overcome your updating problem try to end with a script step: refresh
Window [Flush cached join results]

Ursus

"Dagmar" <dagmar.toeller (AT) eu (DOT) averydennison.com> schreef in bericht
news:1164711905.286189.141020 (AT) n67g2000cwd (DOT) googlegroups.com...
Quote:
Hello together,

I am using FM 7. I am working with related tables for my database. In
one of these tables I have fields related to an automatic ID. If I
want to change the content of the ID-related field the new content will
not be seen in all records but only in those who are created after the
change.

e.g. field NAME content = Smith ID = 32 changing field content from
Smith to Johnson has only affect in new records but I want this change
happens in all records. The old "name" is no longer valid and needed.


Thank's for your help
Dagmar




Reply With Quote
  #3  
Old   
Matt Wills
 
Posts: n/a

Default Re: changing field content of ID related fields - 11-28-2006 , 08:21 AM



I really don't know what else you would expect. If records were created through a relationship with a particular ID value, that value in those records isn't going to change by itself.

You would have to find all records in that related table in which Smith is the value and replace it with Johnson.

See Replace Field Contents in Help.

Matt

On 11/28/2006 06:05:05 "Dagmar" <dagmar.toeller (AT) eu (DOT) averydennison.com> wrote:

Quote:
Hello together,

I am using FM 7. I am working with related tables for my database. In
one of these tables I have fields related to an automatic ID. If I want
to change the content of the ID-related field the new content will not be
seen in all records but only in those who are created after the change.

e.g. field NAME content = Smith ID = 32 changing field content from Smith
to Johnson has only affect in new records but I want this change happens
in all records. The old "name" is no longer valid and needed.

Thank's for your help Dagmar

Reply With Quote
  #4  
Old   
Helpful Harry
 
Posts: n/a

Default Re: changing field content of ID related fields - 11-28-2006 , 11:24 PM



In article <456c4087$0$70836$dbd4d001 (AT) news (DOT) wanadoo.nl>, "Ursus"
<ursus.kirk (AT) wanadoo (DOT) nl> wrote:
Quote:
"Dagmar" <dagmar.toeller (AT) eu (DOT) averydennison.com> schreef in bericht
news:1164711905.286189.141020 (AT) n67g2000cwd (DOT) googlegroups.com...
Hello together,

I am using FM 7. I am working with related tables for my database. In
one of these tables I have fields related to an automatic ID. If I
want to change the content of the ID-related field the new content will
not be seen in all records but only in those who are created after the
change.

e.g. field NAME content = Smith ID = 32 changing field content from
Smith to Johnson has only affect in new records but I want this change
happens in all records. The old "name" is no longer valid and needed.

Thank's for your help
Dagmar

Dagmar,

Normally I won't re-use an ID. Basicaly when Smith is not here any more and
the record not valid, I either move wmith to a seperate table. (Ex-employee)
OR I delete the record completely. An ID would never hold anymore then one
value.
For Johnson I would create a new record and thus a new ID.

To overcome your updating problem try to end with a script step: refresh
Window [Flush cached join results]

Ursus
It's not a good idea to re-use an ID since the related records will be
for the original record not the new one ... the few exceptions might be
something like when a woman gets married and changes her surname (for
example).

Presumably Dagmar has a Name field in both the parent and child tables,
and changing the name in the parent table doesn't change the name in
the related child records.

Normally you wouldn't have a name field in the child table since it's
unnecessary duplication. You would instead have a relationship link
from the child table back to the parent table and then you can use the
"ParentTable::Name" field whenever you need their name, and since this
is the actual parent Name field it will display the new name when
changed.

Sometimes you do need a copy of the field in the child table (eg. when
another sub-child table needs to access the Name), and in this case you
would again use a relationship link back from the child table to the
parent table and an unstored Calculation field that retrieves the Name
from the parent table higher up the chain.
ie.
Name {in Child table}
= ParentTable::Name

As always, there is an exception here as well. You can't do this is the
Name field in the child table for the child side of another
relationship. In this case you then have to use a normal field and then
need a script that updates these fields when the parent record is
changed, but it's a little messy to do.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.