Notifications To display only True values and Ignore False.

rachelturkariga
Giga Contributor

I have created a catalog item, with Check Boxes . And when ever a notification is sent i wanted to ignore all unchecked boxes.

Please refer screenshot .

1) Catalog Item

2) Notification- I want to ignore all False Values

 

 

1 ACCEPTED SOLUTION

Hi Rachel,

answer has been posted here;

https://community.servicenow.com/community?id=community_question&sys_id=daedfa98dbb744d423f4a345ca96...

Please mark this thread as answered and close the question

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

16 REPLIES 16

This is a notification Screenshot.

This image depicts an email template, which uses multiple mail scripts. First of all, you need to figure out which of the mail scripts generates the table.

Hi Slava,

 

Please check the screenshots. 

This email script displays table:

I think you need to wrap template.print() statements on lines 55-58 into an IF block similar to this:

if (vs.get(i).getDisplayValue().toString() != 'false') {
    template.print(...);
    template.print(...);
    template.print(...);
    template.print(...);
}

Hi Slava,

 

I have changed it accordingly, but still there is no change . It is displaying false values.

 

Regards,