Reference Field Requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 09:24 AM
Hi,
Need help for the below requirement.
We have a two reference fields called Difference and Business Application Name. when user selects the test01 record in the Difference reference field. Then the Business Application Name reference field should display corresponding records with respect to Difference reference table.
Here we have common field in the both the tables called BA name.
How can we do this requirement? Can anyone help me.
Thanks in Advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 09:36 AM
Option one is, you dont need a field on the form, you can just dot walk to that field to the form.
Option two is, create an onChange client script to do a getReference and get the Business Application value for the Difference record and populate it.
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 09:39 AM
@Khalid9030 You need to define an onChange client script on Difference field.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
var difference = g_form.getReference('u_difference', callBackResponse); // name of difference field here
}
function callBackResponse(difference){
if(difference)
g_form.setValue('u_business_app_name', difference.u_business_app); // BA name field here
}
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 09:51 AM
@Sandeep Rajput & @SanjivMeher
Sorry for the bad explanation.
I have wanted to limit the records when user click on the Magnifying Glass Icon for the Business Application Name reference field. for example, PFA.
And it should be work like a Assignment group and assigned to field on incident form. and should return the corresponding records with respect to Difference reference table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 09:57 AM
@Khalid9030 You need to set the reference qualifier of Business Application Name field in this case.
Here is an example post covering the same scenario https://www.servicenow.com/community/developer-forum/reference-field-dependency-on-another-reference...
You need to create similar reference qualifier on the Business Application Name field in your case.
If you are still not clear then please share the table structure of both the tables and we will assist you with the reference qualifier.