How to set this field dependency?

Udbhav
Tera Contributor

In incident form, how can I link "Impact" field to "Urgency", so that if value of "Impact" is HIGH then value for "Urgency" is also becomes HIGH, similarly for MEDIAM and LOW as well?

2 ACCEPTED SOLUTIONS

AnveshKumar M
Tera Sage
Tera Sage

Hi @Udbhav 

You can try the following onChange client script on impact field.

 

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

 

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

      return;

   }

   g_form.setValue('urgency', newValue);

   g_form.setReadOnly('urgency', true);

}

 

 

Please mark my answer helpful and accept as solution if it helped you 👍

Thanks,
Anvesh

View solution in original post

Shubham Singh
Mega Guru

Hi @Udbhav 

 

Please follow the below steps to achieve your requirements:

  1. Go to Configure Dictionary of Urgency field and create a new entry in the Dictionary Override related list (if not created already for the incident table).
  2. Mark Override dependent checkbox as TRUE.
  3. Use impact in the Dependent field that will be visible after step 2.
  4. Go back to Configure Dictionary and Choices related list under it.
  5. Fill values in the Dependent Value field of the choices.

 

Below are the screenshots for your reference:

ShubhamSingh_0-1699879819927.png

 

ShubhamSingh_1-1699879932666.png

 

Thanks!

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up 🙂

View solution in original post

2 REPLIES 2

AnveshKumar M
Tera Sage
Tera Sage

Hi @Udbhav 

You can try the following onChange client script on impact field.

 

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

 

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

      return;

   }

   g_form.setValue('urgency', newValue);

   g_form.setReadOnly('urgency', true);

}

 

 

Please mark my answer helpful and accept as solution if it helped you 👍

Thanks,
Anvesh

Shubham Singh
Mega Guru

Hi @Udbhav 

 

Please follow the below steps to achieve your requirements:

  1. Go to Configure Dictionary of Urgency field and create a new entry in the Dictionary Override related list (if not created already for the incident table).
  2. Mark Override dependent checkbox as TRUE.
  3. Use impact in the Dependent field that will be visible after step 2.
  4. Go back to Configure Dictionary and Choices related list under it.
  5. Fill values in the Dependent Value field of the choices.

 

Below are the screenshots for your reference:

ShubhamSingh_0-1699879819927.png

 

ShubhamSingh_1-1699879932666.png

 

Thanks!

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up 🙂