- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 10:36 PM
Hi All,
I have a field called choose ERP which has dropdowns as SAP and GEOS.
There is another field called Entity Name which refers to a custom table. The custom table consists these columns that is Business, SAP and GEOS.
The requirement is if the user selects SAP in ERP field, the Entity Name field should show only the Business which have SAP values(The condition will be SAP is not empty for the Business).
And if the user selects GEOS in ERP field, the Entity Name field should show only the Business which have GEOS values(The condition will be GEOS is not empty for the Business).
Can anyone guide me on this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2023 01:13 AM - edited 11-24-2023 01:15 AM
Hi Nagashree,
Can you try below:
javascript:
var erp = current.variables.u_erp;
if (erp == 'SAP')
'u_sap!=NULL';
else if (erp == 'GEOS')
'u_geos!=NULL';
Please mark this answer as correct and helpful if it solves your issue.
Regards,
Siva Jyothi M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 10:45 PM
Hello @Nagashree5,
Please refer to the below link:
https://www.servicenow.com/community/itsm-forum/how-to-display-reference-field-values-based-on-choic...
Mark my correct and helpful, if it is helpful and please hit the thumbs-up button to mark it as the correct solution.
Thanks & Regards,
Abbas Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 11:06 PM
Hi @Nagashree5
You can set the reference qualifier in the Entity Name field to achieve it.
Sample.
javascript:(current.u_erp == 'SAP') ? 'u_sapISNOTEMPTY' : (current.u_erp == 'GEOS') ? 'u_geosISNOTEMPTY' : 'sys_id=-1';
Replace u_erp, u_sap and u_geos with your field names.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2023 01:13 AM - edited 11-24-2023 01:15 AM
Hi Nagashree,
Can you try below:
javascript:
var erp = current.variables.u_erp;
if (erp == 'SAP')
'u_sap!=NULL';
else if (erp == 'GEOS')
'u_geos!=NULL';
Please mark this answer as correct and helpful if it solves your issue.
Regards,
Siva Jyothi M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2023 01:24 AM
In your custom table do you have any field which holds value SAP or GEOS
If yes then you need to create a script include and call it in your reference qualifier
Thanks,
Manjusha Bangale