Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlighting last record in group based on field content

Status
Not open for further replies.

jannoth

MIS
Oct 9, 2007
60
CA
The thread heading could be better - I just couldn't think of one.

I want to display an alert if final records in Group2 contain a zero in {Attendance}:

GH1
GH2 - also displays field {Expected_No_Of_Events} eg 4
{EventID}1 {Attendance}1
{EventID}2 {Attendance}1
{EventID}3 {Attendance}1
{EventID}4 {Attendance}0 ALERT

The alert is displayed if {Attendance}=0 and it's the final record for the group ie (EventID) = {Expected_No_Of_Events}.

But, it fails because some events are deleted from the database and new ones created in their place. So, {Expected_No_Of_Events} stays unchanged but one {EventID} disappears and is replaced by one of a higher value. Eg

GH1
GH2 - {Expected_No_Of_Events} eg 4
{EventID}1 {Attendance}1
{EventID}2 DELETED so not in database
{EventID}3 {Attendance}1
{EventID}4 {Attendance}1
{EventID}5 {Attendance}0 NO ALERT!!

On the final record, {Attendance}=0 and {Expected_No_Of_Events} is still 4 but {EventID} of the final record is no longer equal [mad]

If anyone can understand my problem, are there any suggestions out there please?

Counting {EventID} doesn't work because the value I need is only available at the GF2 stage and I need to compare sooner.

Thanks again.

J
 
You should be able to just use the following conditions for the alert:

(
onlastrecord or
{table.group2field} <> next({table.group2field})
) and
{table.attendance} = 0

-LB
 
Beautiful - thank you!

Oh, and seasons wishes to you and everyone

[party] [peace] [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top