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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to enhance existing formula

Status
Not open for further replies.

kwr04

Programmer
Jan 15, 2010
11
US
Anybody have any suggestions would appreciate any help.

Shared NumberVar extreme_urgent_count;
If {ESI_esi_audit_hpd_hpd_helpdesk_JOIN.Priority} = "Urgent" Then extreme_urgent_count := extreme_urgent_count +1 Else
extreme_urgent_count := extreme_urgent_count;
extreme_urgent_count


If I have one urgent ticket that gets assigned first to one group then to another group and I only want to count it once. How can I add additional code to this existing code above to accomplish that?

Example of two data records working with:
Ticket# request-id assign_group priority start_date submitted_by
1 839186 3175040 xxxxxxxx urgent 01/18/2010 6:14:02 AM Joe
2 839186 3175044 oooooooo urgent 01/18/2010 6:15:01 AM jill

 
Assuming you are sorting on ticket (ascending)#

If so you could create a running total (I do not have access to check my syntax, it should be fine but this is more to pass the logic)

Field to Summarize: ticket):
Summary Type: Count
Evaluate : Use a formula (#RT_Extreme_Urgent_Count)
Reset : Never (if there is no groups)
---------------------------------
#RT_Extreme_Urgent_Count

//check if previous ticket has already been counted, if not check for urgent status on current ticket

not(
{ticket#} = previous({ticket#}) and
previous({ESI_esi_audit_hpd_hpd_helpdesk_JOIN.Priority} = "Urgent")
) and
{ESI_esi_audit_hpd_hpd_helpdesk_JOIN.Priority} = "Urgent"
---------------------------------


then use the value in the GF or RF, I'm not clear if there is any other groupings
 
thanks dunlp1975 got an error using running total but you did help me come up with this code, it works on decensing ticket records in detail but does not work on first record or last record if statement is true.

any thoughts on that?? appreciate your help

(({ESI_esi_audit_hpd_hpd_helpdesk_JOIN.Priority} = "Medium" and (ESI_esi_audit_hpd_hpd_helpdesk_JOIN.ticket_number} <>
next({ESI_esi_audit_hpd_hpd_helpdesk_JOIN.ticket_number})
and previous({ESI_esi_audit_hpd_hpd_helpdesk_JOIN.ticket_number}) <>
next({ESI_esi_audit_hpd_hpd_helpdesk_JOIN.ticket_number}))))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top