AnsweredAssumed Answered

One entry per month--the last for each month

Question asked by ultranix on Aug 16, 2012
Latest reply on Aug 24, 2012 by philmodjunk


One entry per month--the last for each month


One entry per month--the last for each month?

What an interesting challenge....

I'd use this calculation to give all entries of the same month an identical value:

cMonth: DateField - Day ( Datefield ) + 1

this is the date for the first day of the month for each month.

Then you can define a self join relationship based on cMonth on this table to match each record to all other records of the same month and year.

Max (SelfJoinOccurrence::DateField ) = DateField

will return True or the number 1 for the last record of any given month and thus you could put that calculation into a field named cLastOfMonthFlag and use

PortalTable::cLastOfMonthFlag as part of the filter expression to filter out all but the last entry of each month.

Could you explain it in more detailed way?

I created cMonth field, it returns first day of each month, that is fine.

As I use portal, so then i could maybe avoid creating relations and use Filter portal calculation instead.

I tried this one: cMonth = cMonth and Max(Datefield) = Datefield, but it's not working, as it shows all records in the portal.