dbTalk Databases Forums  

Index not updated when using IWP

comp.databases.filemaker comp.databases.filemaker


Discuss Index not updated when using IWP in the comp.databases.filemaker forum.



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

Default Index not updated when using IWP - 11-03-2005 , 12:27 PM






(This mail was originally part of “FMP8 Max(Table Self:atum)+1”)

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

GetAsDate(Max(Table Self:atum)+1) is auto-entered data.
records are committed within the loop, after every “new record”.

When used with IWP, the trick doesn't work; max() never finds new dates
added with this loop. All new dates have the same value.


The internal relation (self) was based on a computation with global storage

When instead a computational field is used without the global storage
option, the records will be found with max(self:: etc) in next iterations.

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

Is this a FM bug or a FM feature?

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

Default Re: Index not updated when using IWP - 11-03-2005 , 12:58 PM






In article <11mklkcm5jhj077 (AT) corp (DOT) supernews.com>, gertkok (AT) keraweb (DOT) nl
says...
Quote:
(This mail was originally part of =3FFMP8 Max(Table Self:atum)+1=3F)

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

GetAsDate(Max(Table Self:atum)+1) is auto-entered data.
records are committed within the loop, after every =3Fnew record=3F.

When used with IWP, the trick doesn't work; max() never finds new dates
added with this loop. All new dates have the same value.


The internal relation (self) was based on a computation with global storage

When instead a computational field is used without the global storage
option, the records will be found with max(self:: etc) in next iterations.

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

Is this a FM bug or a FM feature?

I'd report it to FM as an IWP bug. I can't think of a legitimate
justification for it to work differently in IWP.

That said, there are better ways of accomplishing what you are doing.
Why not simply compute the first date, and (in pseudocode)

$date = startdate
$loopcounter = 0
$loopmax = x
loop
new record
set date startdate + loopcounter
loopcounter + 1
exit loop if $loopcounter = $loopmax
end loop


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

Default Re: Index not updated when using IWP - 11-03-2005 , 02:36 PM



What is the result when 2 or more users at the same time happen to
trigger the adding of 28 records?

I've been looking for a conversion integer-> date, but couldn't find it.


42 wrote:
Quote:
In article <11mklkcm5jhj077 (AT) corp (DOT) supernews.com>, gertkok (AT) keraweb (DOT) nl
says...
(This mail was originally part of =3FFMP8 Max(Table Self:atum)+1=3F)

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

GetAsDate(Max(Table Self:atum)+1) is auto-entered data.
records are committed within the loop, after every =3Fnew record=3F.

When used with IWP, the trick doesn't work; max() never finds new dates
added with this loop. All new dates have the same value.


The internal relation (self) was based on a computation with global storage

When instead a computational field is used without the global storage
option, the records will be found with max(self:: etc) in next iterations.

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

Is this a FM bug or a FM feature?


I'd report it to FM as an IWP bug. I can't think of a legitimate
justification for it to work differently in IWP.

That said, there are better ways of accomplishing what you are doing.
Why not simply compute the first date, and (in pseudocode)

$date = startdate
$loopcounter = 0
$loopmax = x
loop
new record
set date startdate + loopcounter
loopcounter + 1
exit loop if $loopcounter = $loopmax
end loop

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.