How to configure dependent values

Community Alums
Not applicable

Hi All,

In Incident form we have configured 3 fields Names are shown in screenshot

find_real_file.png

and we have created one table as below

find_real_file.png

here we want like based on Business technology Service , Service Area dropdown should populate,

                                                        Based on Service Area, Name field dropdown should populate.

Here we mainly want make use of table , Bcz in future if some values added means that can be updated in this table.

Could some one suggest on this.

Regards,

Roopa

1 ACCEPTED SOLUTION

Hi Roopa


can u pls create a two table one is on Corporate It and another one is Non-AMD Entity as per ur inputs from above posts then create   two tables and create a three fields on the form where ever u want 1.Preliminary caused by business support 2.Incident Caused By Service Area(ref type from first table ) and 3.Incident Caused By Service Area(ref type from second   table) both are same names but change the values of this fields



then write UI Policy or client scripts like this   can u pls adjust the code as per ur field values but ITIL best practice is ui policy



function onChange(control, oldValue, newValue, isLoading, isTemplate) {


    if (isLoading || newValue === '') {


          return;


    }


      var a =g_form.getValue('u_technology_support');//place ur field name here i.e choice type with options


   


        if ( a== 1) {


                g_form.setDisplay('incident_caused_by_service_area', false);   //place ur fields value here


          }


          else


                g_form.setDisplay('u_service_area', false);//place ur fields value here


          }



I hope this will helpful to u


View solution in original post

23 REPLIES 23

Chuck Tomasi
Tera Patron

Hi Roopa,



This is done at the dictionary level.



Make a field dependent



Once the dependencies are created in the dictionary, you need to select each value, then create the dependent values. For choice lists, use right-click> Configure Choices.


Community Alums
Not applicable

Hi Chuck,



Thanks for reply..



Here we wanted to make use of table created


find_real_file.png



we do not want to configure choice list.


Is there any feasibilty ?



Regards,


Roopa


Hi Roopa,



Yes, you can do this outside of the normal choice configuration, however you will need to maintain the field options yourself. You can do this with a GlideAjax operation using an onChange client script on the 'parent' field(s). See episode 33 of TechNow in the link below for a demonstration of how to do this.



TechNow Episode List


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Roopa,



To add, here is the video link on how to make a field dependent.


Simple way of Dependent Dropdown values in ServiceNow - YouTube