dbTalk Databases Forums  

Checking when a field was last modified

comp.databases.filemaker comp.databases.filemaker


Discuss Checking when a field was last modified in the comp.databases.filemaker forum.



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

Default Checking when a field was last modified - 11-03-2005 , 02:28 AM






Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.

--
Thomas Hansen : th(at)ambolt.no : http://www.ambolt.no/

Reply With Quote
  #2  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Checking when a field was last modified - 11-03-2005 , 02:57 AM






Only if you have specifically created a field to provide such info. I
can't tell from your post whether you are wanting to see who has already
made a change that messed up your data, or if you just want to create
something to reference for later. No way to see the field's prior
history, but for the future:

Create a Timestamp type of field, and in field definitions, set the
field's auto-enter calc to:
case(FieldNameToMonitor, Get(CurrentTimestamp))
Unmark the option to not evaluate if all referenced fields are blank.
Click OK and the unmark the option to not replace existing data for the
field.

This field should now update its timestamp value whenever your other
field (which I called FieldNameToMonitor) is changed.


Thomas Hansen wrote:
Quote:
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


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

Default Re: Checking when a field was last modified - 11-03-2005 , 03:52 AM



In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Quote:
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.
Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.




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

Default Re: Checking when a field was last modified - 11-03-2005 , 07:11 AM



I tried to test your idea.
However I realized that it works for number>0 content of
field-i-want-to-monitor only!
I.e if I enter "0" or any letter the content of field-i-want-to-modify
is empty. A strange behaviour isn't it?

42 wrote:
Quote:
In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.

Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.


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

Default Re: Checking when a field was last modified - 11-03-2005 , 11:42 AM



Just retested here with the letter h, and the numbers 0 and -5, both
worked. Must be something wonky at your end. Not sure if its my
instructions that have the bug, or your execution of them yet though.

Hmmmm....on second thought... Are you sure you implemented my 'case' and
not Harry's very similiar one? We both came up with almost identical
solutions -- the one difference is that I think Harry's will fail on
"0".

Further if the source field is set to be of type "number", not "text",
then "just letters" will evaluate to 0 in the calc, and also fail on
Harry's.

The "or 1" clause in my version of the case statement was put there
specifically to deal with blanks and zeros, and it seems to be working
here.



-Dave


In article <1131023489.574568.324570 (AT) o13g2000cwo (DOT) googlegroups.com>,
hruby (AT) dataapex (DOT) com says...
Quote:
I tried to test your idea.
However I realized that it works for number>0 content of
field-i-want-to-monitor only!
I.e if I enter "0" or any letter the content of field-i-want-to-modify
is empty. A strange behaviour isn't it?

42 wrote:
In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.

Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.



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

Default Re: Checking when a field was last modified - 11-03-2005 , 11:55 AM



Just a minor correction regarding attribution: The other case statement
that doesn't handle "0" was put forth by Howard, not Harry.

(Forgive me both you: Harry for attaching your name to a bug you didn't
make, and Howard for bringing this much attention to your minor bug just
to clear my concsience.)

-regards,
Dave

In article <MPG.1dd3ec06e4a80970989da1 (AT) shawnews (DOT) vf.shawcable.net>,
nospam (AT) nospam (DOT) com says...
Quote:
Just retested here with the letter h, and the numbers 0 and -5, both
worked. Must be something wonky at your end. Not sure if its my
instructions that have the bug, or your execution of them yet though.

Hmmmm....on second thought... Are you sure you implemented my 'case' and
not Harry's very similiar one? We both came up with almost identical
solutions -- the one difference is that I think Harry's will fail on
"0".

Further if the source field is set to be of type "number", not "text",
then "just letters" will evaluate to 0 in the calc, and also fail on
Harry's.

The "or 1" clause in my version of the case statement was put there
specifically to deal with blanks and zeros, and it seems to be working
here.



-Dave


In article <1131023489.574568.324570 (AT) o13g2000cwo (DOT) googlegroups.com>,
hruby (AT) dataapex (DOT) com says...
I tried to test your idea.
However I realized that it works for number>0 content of
field-i-want-to-monitor only!
I.e if I enter "0" or any letter the content of field-i-want-to-modify
is empty. A strange behaviour isn't it?

42 wrote:
In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.

Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.




Reply With Quote
  #7  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Checking when a field was last modified - 11-03-2005 , 12:08 PM



Ok, I admit to not testing my solution. I guess that makes it more of a
theory. But a '0' would not be empty and so it should evaluate
properly. But I'm just not able to test it right now. I'll defer to
Dave on this.

42 wrote:
Quote:
Just a minor correction regarding attribution: The other case statement
that doesn't handle "0" was put forth by Howard, not Harry.

(Forgive me both you: Harry for attaching your name to a bug you didn't
make, and Howard for bringing this much attention to your minor bug just
to clear my concsience.)

-regards,
Dave

In article <MPG.1dd3ec06e4a80970989da1 (AT) shawnews (DOT) vf.shawcable.net>,
nospam (AT) nospam (DOT) com says...
Just retested here with the letter h, and the numbers 0 and -5, both
worked. Must be something wonky at your end. Not sure if its my
instructions that have the bug, or your execution of them yet though.

Hmmmm....on second thought... Are you sure you implemented my 'case' and
not Harry's very similiar one? We both came up with almost identical
solutions -- the one difference is that I think Harry's will fail on
"0".

Further if the source field is set to be of type "number", not "text",
then "just letters" will evaluate to 0 in the calc, and also fail on
Harry's.

The "or 1" clause in my version of the case statement was put there
specifically to deal with blanks and zeros, and it seems to be working
here.



-Dave


In article <1131023489.574568.324570 (AT) o13g2000cwo (DOT) googlegroups.com>,
hruby (AT) dataapex (DOT) com says...
I tried to test your idea.
However I realized that it works for number>0 content of
field-i-want-to-monitor only!
I.e if I enter "0" or any letter the content of field-i-want-to-modify
is empty. A strange behaviour isn't it?

42 wrote:
In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.
Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #8  
Old   
42
 
Posts: n/a

Default Re: Checking when a field was last modified - 11-03-2005 , 12:44 PM



Howard,

I did just test your version; and it did fail on zeros (and if the field
monitored was "number" it failed on text too).

While you are right that a '0' would not be empty, you didn't test for
emptyness you tested for boolean 'truth', and in FM 'truth' is anything
non-blank and non-zero. So while '0' satisifies the non-blank part it
clearly doesn't satisfy non-zero part; and it evaluates to false in the
simple case testing the field:

case(field,get(timestamp))

Its worth pointing out that it would have worked on zero if you'd
explicitly tested for emptyness:

case(not isempty(field), get(timestamp))

But I still prefer the "or 1" tautological solution to emptyness testing
because it will even trap the field-had-data-and-I-made-it-blank
scenario, while emptyness testing won't.

-regards,
Dave



In article <11mkkh7nctmmq2b (AT) corp (DOT) supernews.com>,
howard (AT) antispahm (DOT) fmprosolutions.com says...
Quote:
Ok, I admit to not testing my solution. I guess that makes it more of a
theory. But a '0' would not be empty and so it should evaluate
properly. But I'm just not able to test it right now. I'll defer to
Dave on this.

42 wrote:
Just a minor correction regarding attribution: The other case statement
that doesn't handle "0" was put forth by Howard, not Harry.

(Forgive me both you: Harry for attaching your name to a bug you didn't
make, and Howard for bringing this much attention to your minor bug just
to clear my concsience.)

-regards,
Dave

In article <MPG.1dd3ec06e4a80970989da1 (AT) shawnews (DOT) vf.shawcable.net>,
nospam (AT) nospam (DOT) com says...
Just retested here with the letter h, and the numbers 0 and -5, both
worked. Must be something wonky at your end. Not sure if its my
instructions that have the bug, or your execution of them yet though.

Hmmmm....on second thought... Are you sure you implemented my 'case' and
not Harry's very similiar one? We both came up with almost identical
solutions -- the one difference is that I think Harry's will fail on
"0".

Further if the source field is set to be of type "number", not "text",
then "just letters" will evaluate to 0 in the calc, and also fail on
Harry's.

The "or 1" clause in my version of the case statement was put there
specifically to deal with blanks and zeros, and it seems to be working
here.



-Dave


In article <1131023489.574568.324570 (AT) o13g2000cwo (DOT) googlegroups.com>,
hruby (AT) dataapex (DOT) com says...
I tried to test your idea.
However I realized that it works for number>0 content of
field-i-want-to-monitor only!
I.e if I enter "0" or any letter the content of field-i-want-to-modify
is empty. A strange behaviour isn't it?

42 wrote:
In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.
Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.




Reply With Quote
  #9  
Old   
DataApex
 
Posts: n/a

Default Re: Checking when a field was last modified - 11-04-2005 , 01:01 AM



Yes 42's solution works.
I implemented Howards solution only (I overlooked "or 1") and it does't
work even the field is text type. It doesn't work for any letters and
zero character. Of coarse it is only theoretically interesting not
important.
I apologize for my mystake and to bother you.


42 wrote:
Quote:
Howard,

I did just test your version; and it did fail on zeros (and if the field
monitored was "number" it failed on text too).

While you are right that a '0' would not be empty, you didn't test for
emptyness you tested for boolean 'truth', and in FM 'truth' is anything
non-blank and non-zero. So while '0' satisifies the non-blank part it
clearly doesn't satisfy non-zero part; and it evaluates to false in the
simple case testing the field:

case(field,get(timestamp))

Its worth pointing out that it would have worked on zero if you'd
explicitly tested for emptyness:

case(not isempty(field), get(timestamp))

But I still prefer the "or 1" tautological solution to emptyness testing
because it will even trap the field-had-data-and-I-made-it-blank
scenario, while emptyness testing won't.

-regards,
Dave



In article <11mkkh7nctmmq2b (AT) corp (DOT) supernews.com>,
howard (AT) antispahm (DOT) fmprosolutions.com says...
Ok, I admit to not testing my solution. I guess that makes it more of a
theory. But a '0' would not be empty and so it should evaluate
properly. But I'm just not able to test it right now. I'll defer to
Dave on this.

42 wrote:
Just a minor correction regarding attribution: The other case statement
that doesn't handle "0" was put forth by Howard, not Harry.

(Forgive me both you: Harry for attaching your name to a bug you didn't
make, and Howard for bringing this much attention to your minor bug just
to clear my concsience.)

-regards,
Dave

In article <MPG.1dd3ec06e4a80970989da1 (AT) shawnews (DOT) vf.shawcable.net>,
nospam (AT) nospam (DOT) com says...
Just retested here with the letter h, and the numbers 0 and -5, both
worked. Must be something wonky at your end. Not sure if its my
instructions that have the bug, or your execution of them yet though.

Hmmmm....on second thought... Are you sure you implemented my 'case' and
not Harry's very similiar one? We both came up with almost identical
solutions -- the one difference is that I think Harry's will fail on
"0".

Further if the source field is set to be of type "number", not "text",
then "just letters" will evaluate to 0 in the calc, and also fail on
Harry's.

The "or 1" clause in my version of the case statement was put there
specifically to deal with blanks and zeros, and it seems to be working
here.



-Dave


In article <1131023489.574568.324570 (AT) o13g2000cwo (DOT) googlegroups.com>,
hruby (AT) dataapex (DOT) com says...
I tried to test your idea.
However I realized that it works for number>0 content of
field-i-want-to-monitor only!
I.e if I enter "0" or any letter the content of field-i-want-to-modify
is empty. A strange behaviour isn't it?

42 wrote:
In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.
Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.





Reply With Quote
  #10  
Old   
42
 
Posts: n/a

Default Re: Checking when a field was last modified - 11-04-2005 , 01:09 AM



In article <1131087174.677188.263730 (AT) z14g2000cwz (DOT) googlegroups.com>,
hruby (AT) dataapex (DOT) com says...
Quote:
Yes 42's solution works.
I implemented Howards solution only (I overlooked "or 1") and it does't
work even the field is text type.
Hmmm... you appear to be right... I'd have thought it -would- work on a
text field, but testing confirms your results.

Quote:
It doesn't work for any letters and
zero character. Of coarse it is only theoretically interesting not
important.
In this case maybe, but I think its genuinely interesting.

Quote:
I apologize for my mystake and to bother you.
No bother at all. I learned something; I think many of us did.

-Dave

Quote:
42 wrote:
Howard,

I did just test your version; and it did fail on zeros (and if the field
monitored was "number" it failed on text too).

While you are right that a '0' would not be empty, you didn't test for
emptyness you tested for boolean 'truth', and in FM 'truth' is anything
non-blank and non-zero. So while '0' satisifies the non-blank part it
clearly doesn't satisfy non-zero part; and it evaluates to false in the
simple case testing the field:

case(field,get(timestamp))

Its worth pointing out that it would have worked on zero if you'd
explicitly tested for emptyness:

case(not isempty(field), get(timestamp))

But I still prefer the "or 1" tautological solution to emptyness testing
because it will even trap the field-had-data-and-I-made-it-blank
scenario, while emptyness testing won't.

-regards,
Dave



In article <11mkkh7nctmmq2b (AT) corp (DOT) supernews.com>,
howard (AT) antispahm (DOT) fmprosolutions.com says...
Ok, I admit to not testing my solution. I guess that makes it more of a
theory. But a '0' would not be empty and so it should evaluate
properly. But I'm just not able to test it right now. I'll defer to
Dave on this.

42 wrote:
Just a minor correction regarding attribution: The other case statement
that doesn't handle "0" was put forth by Howard, not Harry.

(Forgive me both you: Harry for attaching your name to a bug you didn't
make, and Howard for bringing this much attention to your minor bug just
to clear my concsience.)

-regards,
Dave

In article <MPG.1dd3ec06e4a80970989da1 (AT) shawnews (DOT) vf.shawcable.net>,
nospam (AT) nospam (DOT) com says...
Just retested here with the letter h, and the numbers 0 and -5, both
worked. Must be something wonky at your end. Not sure if its my
instructions that have the bug, or your execution of them yet though.

Hmmmm....on second thought... Are you sure you implemented my 'case' and
not Harry's very similiar one? We both came up with almost identical
solutions -- the one difference is that I think Harry's will fail on
"0".

Further if the source field is set to be of type "number", not "text",
then "just letters" will evaluate to 0 in the calc, and also fail on
Harry's.

The "or 1" clause in my version of the case statement was put there
specifically to deal with blanks and zeros, and it seems to be working
here.



-Dave


In article <1131023489.574568.324570 (AT) o13g2000cwo (DOT) googlegroups.com>,
hruby (AT) dataapex (DOT) com says...
I tried to test your idea.
However I realized that it works for number>0 content of
field-i-want-to-monitor only!
I.e if I enter "0" or any letter the content of field-i-want-to-modify
is empty. A strange behaviour isn't it?

42 wrote:
In article <violon-043E62.09281803112005 (AT) sunsite (DOT) dk>, violon (AT) online (DOT) no
says...
Is it possible to find out when a field was last modified - not the
entire record, but a certain field within that record? I'm on Filemaker
8.
Define a field, set it as 'date' field, with an auto enter calculation:

case(field-i-want-to-monitor or 1, get(currentdate))

make sure to A) tick the "replace contents" box in the field definition,
and to B) to un-tick the "do not calculate if all referenced fields are
empty" box on the bottom of the window where you specify the above
calculation.

basically, what happens is that the case clause is a tautology (it
ALWAYS evaluates to true), and including the 'field-i-want-to-modify' in
it creates a dependancy on the 'field-i-want-to-monitor'.

So when the field-i-want-to-monitor is changed the autoenter calc is
triggered, evaluates to true, and returns the current date as its new
value.

The A) option ensures that it will 'reset' itself each time the field is
changed. (if its not set it will only work if the date field is empty.

The B) option ensures that "erasing" the field-i-want-monitor still
triggers the autoenter.






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.