Skip to Content
0
Former Member
Feb 21, 2017 at 10:01 AM

Custom OVS using SADL query: Filter based on validity date

371 Views Last edit Sep 05, 2017 at 07:40 PM 2 rev

Hi All,

I am trying to display valid categories in and OVS, have created an SADL query based on Service Issue Category Catelogue.

TO make sure that the valid dates are only displayed in the OVS, I have written the below script in the event handler after the Items are populated from above mentioned SADL:

for i in 0..($data.Items.Count-1) $data.Items.Get(i).InputField = $data.InTodayDateTime; $controller.DateTimeUtils.dateSub($data.Items.Get(i).EndDateTime,$data.InTodayDateTime,j) $controller.DateTimeUtils.dateSub($data.InTodayDateTime,$data.Items.Get(i).StartDateTime,k) if(j < 0) $data.Items.Delete(i); end if(k < 0) $data.Items.Delete(i); end end

Here $data.InTodayDateTime is getting the current date time from EC where the OVS is embedded to a field.

PLease guide how to perform this validation.

If this approach is not suggested, guide me with the appropriate one.