dbTalk Databases Forums  

FMP8 Max(Table Self::Datum)+1

comp.databases.filemaker comp.databases.filemaker


Discuss FMP8 Max(Table Self::Datum)+1 in the comp.databases.filemaker forum.



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

Default FMP8 Max(Table Self::Datum)+1 - 10-30-2005 , 12:46 AM






A table needs 1 record for every day in the calendar.
In the auto-enter setup this formula is entered:

Max(Table Self:atum)+1

Table Self is an internal relation.

The dates look fine, but when searched, they are useless.

They can't be found.

GetAsDate(Max(Table Self:atum)+1) works fine.

Is this conversion step always necessary for date computations?

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

Default Re: FMP8 Max(Table Self::Datum)+1 - 10-30-2005 , 02:06 AM






The conversion step should not be necessary, but this is a known bug in
the current version of FileMaker 8...so unfortunately your conversion is
a good way around the problem. The bug only effects stored calcs
(including auto-enter calcs and stored calc fields). Believe it or not,
you can likely avoid the bug by first copying a date -- any date -- to
your clipboard and then adding a new record. Not very practical, but
it'd be a good bar trick.

Gert Kok wrote:
Quote:
A table needs 1 record for every day in the calendar.
In the auto-enter setup this formula is entered:

Max(Table Self:atum)+1

Table Self is an internal relation.

The dates look fine, but when searched, they are useless.

They can't be found.

GetAsDate(Max(Table Self:atum)+1) works fine.

Is this conversion step always necessary for date computations?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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   
Gert Kok
 
Posts: n/a

Default Re: FMP8 Max(Table Self::Datum)+1 When used withIWP - 11-02-2005 , 03:39 PM



A number of records is added with a loop, the records have sequential dates.

Max(Table Self:atum)+1 is auto-entered data.
records are committed within the loop

When used with IWP, the trick doesn't work; max() never finds dates
added with this loop.
Is the index used for max() not updated when the database is accessed
from the web?

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

Default Re: FMP8 Max(Table Self::Datum)+1 When used withIWP - 11-03-2005 , 12:53 AM



Additional info:

The internal relation (self) is based on a computation with global
storage. Records that are added in this loop will not show up in the
next iteration of the loop.

When a computational field is used without the global storage option,
the records will be part of the max(self:: etc)in a next iteration.

When running in native mode, I don't see this differend behaviour.

Is this a FM bug or a FM feature?


Gert Kok wrote:
Quote:
A number of records is added with a loop, the records have sequential
dates.

Max(Table Self:atum)+1 is auto-entered data.
records are committed within the loop

When used with IWP, the trick doesn't work; max() never finds dates
added with this loop.
Is the index used for max() not updated when the database is accessed
from the web?

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.