Problems with maximum aggregation

Questions and answers for designing and implementing forms in Servoy

Problems with maximum aggregation

Postby DFehrenbach » Sat Feb 07, 2004 4:46 am

I have a table billings and a table receipts with a one-to-many relationship. Since there can be many receipts for each bill, I want to make a calculation field in billing that will show the last receipt payment date.

In receipt, I have an aggregation field cLastPayDate as the maximum of the receipt table field datepaid
In billing file I have a calculation datetime field called cLastPaidDate defined as return billing_to_receipts.cLastPayDate;
Is this the right way to do this? The field in the
billing table is blank for all records.
Last edited by DFehrenbach on Sat Feb 07, 2004 4:53 pm, edited 1 time in total.
DFehrenbach
 
Posts: 252
Joined: Sat Sep 13, 2003 6:48 pm
Location: Cleveland, OH

Postby IT2Be » Sat Feb 07, 2004 12:19 pm

What happens if you show the field in the/a receipt form. Is the value correct there?

Can you post the calculation you made?
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby DFehrenbach » Sat Feb 07, 2004 4:46 pm

No, the field in receipts table is blank.
calc used in billing table is:
var lastdate=billing_to_receipts.cLastPayDate
return lastdate;
.
All of the other calculation fields in billing calculate correctly.
DFehrenbach
 
Posts: 252
Joined: Sat Sep 13, 2003 6:48 pm
Location: Cleveland, OH

Postby IT2Be » Sat Feb 07, 2004 5:56 pm

Maybe you can check the 'maximum' aggregation with a number or integer value to see if/how it works?

Could be a bug or could be that date aggregations don't work this way?
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby Jan Blok » Mon Feb 09, 2004 5:30 pm

Bug confirmed, will be fixed in Servoy 2.0 rc5
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby DFehrenbach » Mon Feb 09, 2004 8:33 pm

Thanks Jan!
DFehrenbach
 
Posts: 252
Joined: Sat Sep 13, 2003 6:48 pm
Location: Cleveland, OH


Return to Forms

Who is online

Users browsing this forum: No registered users and 4 guests