Interceptor

Sudhriti Mitra
Tera Contributor

Hi All

Is it possible to have conditions or table specific interceptors? Any suggestions

15 REPLIES 15

Hi Sudhriti,



You can create interceptor for change or modify if already exists.


Refer the snapshots:


create new interceptor:interceptor1.PNG


Then click on "new" in the related list "Answers" and create option for Normal


interceptor2.PNG


This will open the form directly with the Type "Normal".


Similarly you can create for other change types too.


If you want to hide other type options:


you can create an onLoad client script as ex:


if(type=='Normal'){


g_form.removeOption('type','Standard');


g_form.removeOption('type','Emergency');


}


if(type=='Standard'){


g_form.removeOption('type','Normal');


g_form.removeOption('type','Emergency');


}


if(type=='Emergency'){


g_form.removeOption('type','Standard');


g_form.removeOption('type','Normal');


}



PS: Hit answered, like, Helpful or Correct depending on the impact of the response.


zica
Giga Guru

Sudhriti,



You can also use an OnLoad / OnChange client script which will remove/add options on the field when the form is loading.


You can use the following script :


if (g_form.getValue('type') == 'Normal') {


      g_form.removeOption('type', 'Standard');


      g_form.removeOption('type', 'Routine');


} else if (..........) {


      g_form.removeOption('FieldName', 'FieldValue');



}



Kind regards


ZA


Do not feel shy to mark correct or helpful answer if it helps or is correct


Sudhriti Mitra
Tera Contributor

Thanks guys for all the suggestions


But I am looking for something like this


find_real_file.png



I want to prevent the display of comprehensive and emergency change here not after loading the change form. Any suggestions?


zica
Giga Guru

Open interceptors >> Open the Change Request Models >> then Make false the following highlighted links :



Here is the screenshot   :


find_real_file.png



Kind regards,


Za


Do not feel shy to mark correct or helpful answer if it helps or is correct


That will deactivate them altogether. I want to restrict based on conditions from the form level. If   I am selecting change type as Emergency on the form and clicking on new button only emergency should be there on the interceptor. Is there any way to make a list of interceptors condition based? Means if I select Emergency on form Interceptor should give me only emergency and same goes with Routine and comprehensive.