Email scripts

Dhanush Rao K
Tera Contributor

Hi,

 

      I was working on condition table where I need to check only Admin created Email Scripts.

Can anyone help me out with the proper conditions instead of using Sys_id.

 

DhanushRaoK_1-1757340259569.png

Regards,

Dhanush

 

4 REPLIES 4

Chaitanya ILCR
Kilo Patron

Hi @Dhanush Rao K ,

sys_created_by usually stores the UserID(user_name) of the user record not the sysid

 

you can replace the sysid with user_name of the admin user record 

 

is it correct to check a condition we usually use "==" not '=' is the expression correct? if not replace '=' with '=='

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

kaushal_snow
Mega Sage

Hi @Dhanush Rao K ,

 

1. condition (using encoded query)
sys_created_by=admin

 

2. evaluate (using boolean check)

This field should return true or false based on runtime evaluation. For example:

answer = (current.sys_created_by == gs.getUserID('admin'));

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

SANDEEP DUTTA
Tera Patron
Tera Patron

Hi @Dhanush Rao K ,

You can use : sys_created_by=admin

 

Thanks,
Sandeep Dutta

Please mark the answer correct & Helpful, if i could help you.

Ankur Bawiskar
Tera Patron
Tera Patron

@Dhanush Rao K 

what's your actual business requirement and what are you trying to achieve?

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