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!

Global Variable for Date Range?

Status
Not open for further replies.

lilabell

MIS
Apr 29, 2003
88
US
Hello Good folks of the forum I have attempted to create the following section of a script that routes the call to a different mailbox if the date falls into a Specified range. Here is the problem I have 4 Different agents for on call so I can not use the GV DAY OF MONTH with out a GV MONTH as the day of month may over lap from one month to the next with the two agents. For example JC is on call the 2nd through the 15th of February and Eric is on call the 2nd through the 15th of March. So I built a GV for February and March and Named them February and March. I made a GV for the date range of the 2nd through the 15th for JC on Call and one for the 2nd through the 15th for Eric on call and Named them JC_OnCall and Eric_OnCall as well as for the other 2 agents. The script will let me use the GV DAY OF MONTH but not in combination with the GV MONTH. Any Ideas on how to simplify this process would be greatly appreciated!


Section Night_Treatment

If DAY OF MONTH = JC_OnCall {and MONTH = January}
Then execute JCONCALL_Treatment
End if

The portion in the braces is what I am having difficuly with. It will accept the portion with out the braces. It will not accept these variations either


If MONTH = January
Then execute JCONCALL_Treatment
End if


If MONTH = January and DAY OF MONTH = SysOpsJC_OnCall Then execute JCONCALL_Treatment

This is the only variation that works but for the reasons explained above i need to have both the DAY OF MONTH and MONTH reference in order for it to do what I would like it to do.

If DAY OF MONTH = JC_OnCall
Then execute JCONCALL_Treatment
End if

End if


Your help would be most appreciated!

Thnk you,

Lilabell
 
Please help I cant not find any reason why this is not working? I think there may be a better (cleaner?) way to achieve this?
 
you have to use the correct syntax for the month intrinsic..

MONTH OF YEAR = XXXX where x is the month you want


WHERE MONTH OF YEAR EQUALS
VALUE JANUARY: EXECUTE JCONCALL_Treatment
VALUE FEBURARY: EXECTUTE WHOEVERONCALL_treatment
...
DEFAULT : DO WHAT EVER DEFAULT YOU WANT
ENDWHERE

or you can use IF THEN statements

 
Perfect!!!Thank you sooooo very much for helping out the newbie!!!

Thanks again,

Lilabell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top