Skip to main content

Cancelled/Waived Scheduled Actions Display

Problem

When a Scheduled Actions is marked as Cancelled or Waived, the status remains like "Past Due" or "Today" on the Scheduled Actions tab. The operator must drill down into the row to see the real status, which is quite inconvenient.

Note that this issue only exists in the desktop client; Self-Service 9 handles Canceled/Waived without issue.

This has been an issue for years. See a customer's suggestion from 18 years ago, IDEA-19750, as well as defect 1-SXC0CF.

Solution

I was thrilled to discover that the PowerBuilder DataWindow Expression that calculates the Status column can be updated in the database to add additional statuses (despite being greyed out in Magic Easel). Use the following script in your environment (please test first):

USE Campus6

DECLARE @today DATETIME = dbo.fnMakeDate(getdate())
	,@now DATETIME = dbo.fnMakeTime(getdate())
	,@opid nvarchar(8) = 'WBEST'

BEGIN TRAN

INSERT INTO [ABT_OBJECTSMODIFY]
SELECT N'd_ff_actionschedule'
	,N'c_action_status'
	,N'expression'
	,N'PUBLIC'
	,N'''If(Not(IsNull(actionschedule_execution_date) or actionschedule_execution_date = Date("0/0/0000")), "Complete", If(actionschedule_canceled = "Y", "Canceled", If(actionschedule_waived = "Y","Waived", If(DaysAfter(actionschedule_scheduled_date,Today()) < 0, "Future", If(DaysAfter(actionschedule_scheduled_date,Today()) = 0,"Today","Past Due")))))'''
	,N'''If(	Not( IsNull(actionschedule_execution_date) or actionschedule_execution_date = Date("0/0/0000")), "Complete", If(DaysAfter(actionschedule_scheduled_date,Today()) < 0, "Future", If(DaysAfter(actionschedule_scheduled_date,Today()) = 0,"Today","Past Due")))'''
	,@today
	,@now
	,@opid
	,N'0001'
	,@today
	,@now
	,@opid
	,N'0001'
	,N'*'

UNION ALL

SELECT N'd_tab_actionschedule'
	,N'c_action_status'
	,N'expression'
	,N'PUBLIC'
	,N'''If(Not(IsNull(actionschedule_execution_date) or actionschedule_execution_date = Date("0/0/0000")), "Complete", If(actionschedule_canceled = "Y", "Canceled", If(actionschedule_waived = "Y","Waived", If(DaysAfter(actionschedule_scheduled_date,Today()) < 0, "Future", If(DaysAfter(actionschedule_scheduled_date,Today()) = 0,"Today","Past Due")))))'''
	,N'''If(	Not( IsNull(actionschedule_execution_date) or actionschedule_execution_date = Date("0/0/0000")), "Complete", If(DaysAfter(actionschedule_scheduled_date,Today()) < 0, "Future", If(DaysAfter(actionschedule_scheduled_date,Today()) = 0,"Today","Past Due")))'''
	,@today
	,@now
	,@opid
	,N'0001'
	,@today
	,@now
	,@opid
	,N'0001'
	,N'*';

ROLLBACK TRAN

To remove this modification, simply delete these rows from [ABT_OBJECTSMODIFY].