- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 12:14 PM
Hi all
I need some help
I have a custom table with two reference fields ,one COMPANY field reffering to 'corecompany' table and the other field
USER reffering to 'sys_user' table. If i select a company name in COMPANY field ,then the users only assosiated with that company name should be displayed . How can i do this using script include please help.
Thanks in Advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 05:12 PM
If you can you should try using field dependency as phuong has suggested.
If this fails (sometimes reference dependencies don't work) use a reference qualifier on the User field:
javascript:'company=' + current.company
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 03:51 PM
Hi Dileep,
Could you elaborate on why you need to do this using a script include? You could just use the "Depending" field in the "Depending Field" tab of the dictionary entry to achieve the desire result.
Regards,
Phuong
If you find my suggestions helpful, please mark it as correct or helpful to help out others as well 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 05:12 PM
If you can you should try using field dependency as phuong has suggested.
If this fails (sometimes reference dependencies don't work) use a reference qualifier on the User field:
javascript:'company=' + current.company
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 07:11 PM
Thankyou Paul Morris
Working fine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 07:39 PM
Great!
Please mark as correct if your problem is solved 🙂
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022