Populate reference field values based on the choice field

User351756
Giga Expert

Hi All,

 

I have a table Budget where there is
1. A choice field Budget type - Opex, Capex
2. Reference field HFM (Referring to HFm company table) has a field Budget type as "Opex, Capex and Both"

Now when user selects Opex on Budget table, HFM records with Budget type 'Opex and Both' should populate

And, when user selects Capex on Budget table, HFM records with Budget type 'Capex and Both' from HFM should populate.

1 ACCEPTED SOLUTION

Hi Sony,

 

I have tried using Reference Qualifier and it worked.

javascript: 'u_budget_type=Both^ORu_budget_type=' + current.u_budget_type;

 

Thanks.

View solution in original post

4 REPLIES 4

Pullela Sony1
Tera Contributor

Hi ,

Please refer below link do changes accordingly it might help you:

 

https://www.servicenow.com/community/itsm-forum/auto-populate-reference-field-with-value-based-on-6-...

 

I hope this will help you.

If it works then kindly mark the answer as correct .

 

 

Thank you,
Sony

Hi Sony,

 

It din't work. Reference field is returning all the records irrespective of the Budget type I selected.

 

Thanks.

Can you please send your code here

Hi Sony,

 

I have tried using Reference Qualifier and it worked.

javascript: 'u_budget_type=Both^ORu_budget_type=' + current.u_budget_type;

 

Thanks.