The CreatorCon Call for Content is officially open! Get started here.

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 

 

9 REPLIES 9

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.

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

@suuriyas 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏

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