dbTalk Databases Forums  

Newbie: Adding fields of records prior

comp.databases.filemaker comp.databases.filemaker


Discuss Newbie: Adding fields of records prior in the comp.databases.filemaker forum.



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

Default Newbie: Adding fields of records prior - 08-16-2005 , 01:18 PM






Hi,

I have a database that (among other things) tracks the duration of a
given task. I would like to include a calculation field that adds the
previous records duration tasks and displays them in the current
record for example:

Record No. Duration Cumulative Current Cumulative
1 10 min 0 10
2 15 10 25
3 3 25 28
4 22 28 50
5 16 50 66

If I am displaying a layout with the record 3 data, I want it to
return a value 25 (the sum of records 1 and 2). I may want an
additional field that adds the previous records + the current record
for a value of 28 min on record three. I am needing some guidance on
how to script the Cumulative and Current Cumulative fields.

Any assistance is greatly appreciated.

Many thanks,
Antonio


Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Newbie: Adding fields of records prior - 08-16-2005 , 01:48 PM






Calculations deal with the current record, while relationships may cover
many records, so the idea would be to combine the two, with something
like :
"Cumul = SUM(self relationship based on the task ID:uration)"
Remi-Noel


"Reef Diver" <reef (AT) home (DOT) com> a écrit dans le message de news:
mna4g19ev6l9ca7nolmdvku1kcvi63trk9 (AT) 4ax (DOT) com...
Quote:
Hi,

I have a database that (among other things) tracks the duration of a
given task. I would like to include a calculation field that adds the
previous records duration tasks and displays them in the current
record for example:

Record No. Duration Cumulative Current Cumulative
1 10 min 0 10
2 15 10 25
3 3 25 28
4 22 28 50
5 16 50 66

If I am displaying a layout with the record 3 data, I want it to
return a value 25 (the sum of records 1 and 2). I may want an
additional field that adds the previous records + the current record
for a value of 28 min on record three. I am needing some guidance on
how to script the Cumulative and Current Cumulative fields.

Any assistance is greatly appreciated.

Many thanks,
Antonio




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

Default Re: Newbie: Adding fields of records prior - 08-22-2005 , 12:32 PM



If you want to show the running total for the found set, consider creating a
summary field and using the "running total" option.


--

Chris Cain
Extensitech, Inc.
ccain (AT) extensitech (DOT) com


"Reef Diver" <reef (AT) home (DOT) com> wrote

Quote:
Hi,

I have a database that (among other things) tracks the duration of a
given task. I would like to include a calculation field that adds the
previous records duration tasks and displays them in the current
record for example:

Record No. Duration Cumulative Current Cumulative
1 10 min 0 10
2 15 10 25
3 3 25 28
4 22 28 50
5 16 50 66

If I am displaying a layout with the record 3 data, I want it to
return a value 25 (the sum of records 1 and 2). I may want an
additional field that adds the previous records + the current record
for a value of 28 min on record three. I am needing some guidance on
how to script the Cumulative and Current Cumulative fields.

Any assistance is greatly appreciated.

Many thanks,
Antonio




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

Default Re: Newbie: Adding fields of records prior - 08-24-2005 , 10:08 PM



Perfect. Exactly what I needed. THANK YOU!!!

Now the additional thing I want to do, is get that same calculated
value from the previous record and display it in the current trecord.
Is there an easy way to do this?




On Mon, 22 Aug 2005 17:32:32 GMT, "Shadenfroh" <shadenfroh (AT) yahoo (DOT) com>
wrote:

Quote:
If you want to show the running total for the found set, consider creating a
summary field and using the "running total" option.


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.