Choices are not populating based on dependent variable on Incident form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2024 04:23 AM
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
But on incident form all choice are visible irrespective of X is choosen or Y is choosen.
Please advice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2024 04:29 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2024 10:22 PM
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:
- 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.
- Open the dictionary entry for the List type variable.
- Remove all existing choices.
- Apply the changes as shown in the snapshot below.
This will properly configure the List variable with dependent values.
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 ;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 11:03 AM
Hi Vrushali,
Thank you for response.
We need to refer it to sys_choice table only since we are mapping variables from record producer.