Hide <tr> and <td> from HTML notification based on condition

manish62
Tera Contributor

Hello Team,

I have created on email notification and displaying some the attribute based on table row and table column.

Requirement is to hide one table row based on the value from catalog item table, if the value is preset in catalog item then that row should be visible and if not then it should not display.

 

I have created email script to check the value in catalog item and hiding of row is working but when it display then alignment of table is not working as expected since template.print is used to show the "Approver Information" .

Requested for    test 
Reference    TASK00
Approver Information       Ensure that you only approve requests. Incorrectly approved requests may result in unauthorised access to applications and resources.

Can i put condition in my HTML email template to hide <tr> & <td> , in this case i don't need to use the template.print("Approver Information").

Thanks,

Manish

3 REPLIES 3

suvro
Mega Sage
Mega Sage

Below thread will help you

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

Kalyani Jangam1
Mega Sage
Mega Sage

Hi, Refer below docs

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

manish62
Tera Contributor

Hello, 

Thanks for reply, <tr> & <td> code is written in email notification, my requirement  is when the condition true  using the email script then it should display that <tr> and <td> code.

Can i use any "if" condition in email HTML so that it will check from email script that if value doesn't none then it allows to execute that code else hide.

Thanks,

Manish