Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Users with empty mail id should not be display in all reference user field

suuriyas
Tera Contributor

HI Community,

 

I have a requirement, in all form fields (different tables like incident problem change etc) which reference to user table , all catalog variables reference to user table.

users with empty email id should not be display.

How can we achieve this instead of opening each variable or each dictionary to add reference qualifier is there a way to do it in one go or any easy and efficient way to achieve this?

 

And i also concern about what if t overrides 

 

14 REPLIES 14

HI @M Iftikhar ,

 

Thanks for replying 

 

Can you please elaborate on how to use query BR to achieve this?

@suuriyas 

see the approach below I shared using existing OOTB query business rule.

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

@suuriyas,

 

Open this "user query" business rule and add this line: current.addNullQuery("email");

Business Rule:
Link: https://<your-instance>.service-now.com/sys_script.do?sys_id=62a7bfaf0a0a0a6500c49682bd82376a

MIftikhar_0-1759929794324.png

If my response helped, please mark it as the accepted solution so others can benefit as well.

 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

HI @M Iftikhar ,

HI @Ankur Bawiskar ,

 

Thanks it works but by doing this even in user table we are not able to see those records right but i don't want that to happen....only in field reference to user table alone and in catalog variable reference to user table alone i don't want to show this records

Ankur Bawiskar
Tera Patron
Tera Patron

@suuriyas 

but why users will have no email in their sys_user record?

it means data is not proper

Please discuss with your customer and perform clean up of sys_user table

Also you can update the OOTB query business rule on sys_user in case you don't wish to update the Reference qualifier

I highlighted the addition in Yellow

AnkurBawiskar_0-1759928532940.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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