Creating a Breakdown by Month

KBoz
Tera Expert

Hi, I am trying to create a breakdown based on picking the month from a date field on a record.

 

The script I am running is:

 

var gdt = new GlideDate();
gdt.setDisplayValue(current.vulnerability.date_published);
trimmedDate = gdt.getMonthLocalTime();
trimmedDate;

 

When I logged results, I could see that the month value was getting separated out:

KBoz_0-1689090086514.png

 

I'm trying to match the extracted month to a manual breakdown named 'Month:

KBoz_1-1689090215728.png

which I use for a breakdown source name 'Month':

KBoz_2-1689090297801.png

Which is mapped to an Automated Breakdown named 'Date Published-Month':

KBoz_3-1689090361374.png

But the data comes back with all records as unmatched for the Month.  Any ideas what I am doing wrong?

2 REPLIES 2

Tushar
Kilo Sage
Kilo Sage

Hello,

 

Did you verified the format of the extracted month value or the configuration of the breakdown source to troubleshoot the problem:

Check the format of the trimmedDate variable and ensure that it is in the format expected by the breakdown source configuration.

Hi, Tushar - Thanks for the suggestion.  How do I check the format of the variable?  Can I assume that since it is a date and I am using a date function that the trimmedDate variable is considered a date? 

 

The breakdown is pulling from a manual breakdown list and those values are text.