- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 07:39 AM
Hi,
How can I make one Reference Field depending on the value of another (Reference) field in record producer form?
Can anyone help me it will help!
Thanks in Advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 08:48 AM
Yes so in the reference qualifier what you need to do is use the below code
javascript:'tablefieldname='+current.varibales.firstvariablename
Now in the above line you need to replace the tablefieldname with the fieldname which contains the account value in the site table.
And firstvariablename should replace the variable name of account variable
Please paste a screenshot of what you have written so it is easier to guide you.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 08:58 AM
Please write is as you see in the below screenshot:-
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 10:25 PM - edited 09-26-2023 10:29 PM
Hi @Saurav11
Your article is very helped for me Thank you!
And one more thing am structing on Incident form -> based on the account and site, list of contacts should be visible on the 'caller' field. we have contacts in accounts and site tables.
So can you please help with any reference qualifier code.
Thanks!
Mania
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 02:33 AM - edited 09-29-2023 02:40 AM
Hi @Saurav11
Its working your code but once I submit a case request from the portal. Those fields values is not replicate in case form only Account field value is working but not replicat the site field value.
Is there any changes in reference qualifier code. Can you please suggest me.
Thanks!
Mania

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 08:29 AM - edited 09-26-2023 08:29 AM
@mania You can simply choose to write an advanced reference qualifier on the Type specification of second reference field
javascript:"account=" + current.variables.account
For more information please refer to https://docs.servicenow.com/en-US/bundle/vancouver-platform-administration/page/script/server-script...
Hope this helps.