How can I make one Reference Field depending on the value of another (Reference) field in record pro

mania
Tera Contributor

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!

mania_0-1695739074016.png

Thanks in Advance!

 

1 ACCEPTED SOLUTION

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.

View solution in original post

8 REPLIES 8

Please write is as you see in the below screenshot:-

 

Saurav11_0-1695743879356.png

 

Please mark my answer as correct based on Impact.

mania
Tera Contributor

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.

mania_0-1695792195097.png

Thanks!

Mania

mania
Tera Contributor

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.

mania_0-1695979754335.png

mania_1-1695979929248.png

 

Thanks!

Mania

Sandeep Rajput
Tera Patron
Tera Patron

@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.