Choices are not populating based on dependent variable on Incident form

Ankita Gupte
Kilo Sage

Hello Experts,

I have two variables on incident form as below

A - is Choice type variable which has values x & y

B - is List type variable which has 300 choices. In which 150 choices are mapped to value x and another 150 choices are mapped to value y and based on values choose in Variable A, Variable B values should reflect.

 

I am using correct dependent values in sys_choice table 

where dependent values are marked as x & y against the choices and under Variable B made it dependable on value A

AnkitaGupte_0-1720264830076.png

But on incident form all choice are visible irrespective of X is choosen or Y is choosen. 

 

Please advice

3 REPLIES 3

Satishkumar B
Giga Sage
Giga Sage

Hi @Ankita Gupte 

check this : https://www.servicenow.com/community/now-platform-forum/choice-list-not-populating-when-the-dependen...

-----------------------------------------------------------------------------------

Please consider marking my reply as Helpful  👍 and/or Accept Solution ✔️ , if applicable. Thanks!



Vrushali  Kolte
Mega Sage

Hello @Ankita Gupte ,

 

The above configuration is not working because only a choice or reference field can be declared dependent on another field on the same table. However, if you reverse the configuration, it will function correctly. For more information please refer - https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/field-admini...

 

To achieve this, follow these steps:

  1. Add the choices for your List variable in the question_choice table, mapping the dependent values to end with '_x' or '_y'. For example, if the value is '1', store it as '1_x'. Ensure that you change only the value and not the label. See the snapshot for more details.
  2. Open the dictionary entry for the List type variable.
  3. Remove all existing choices.
  4. Apply the changes as shown in the snapshot below.

This will properly configure the List variable with dependent values.

 

VrushaliKolte_1-1720415815561.png

 

 

VrushaliKolte_0-1720415460803.png

 

I have tried this solution in my PDI and it is 100% working for me.

 

If my answer solves your issue, please mark it as Accepted ✔️ and Helpful 👍 based on the impact.

javascript: getFilter(current.u_choice + "");

function getFilter(choice){
           return 'valueENDSWITH_'+choice ;
}

Hi Vrushali,

 

Thank you for response.

 

We need to refer it to sys_choice table only since we are mapping variables from record producer.