Hide templates from drop-down while using a specific template using FAFR

Hide templates from drop-down while using a specific template using FAFR

The below script can be used in the respective incident template under Form Load section of Field and Form Rules.

if(["Application Crashes Frequently","New incident"].indexOf(jQuery("select#template_box").select2("data").text)==-1){
jQuery("select#template_box").parent().hide()
}



The rule has to be created under the template where you do not want the other templates to be shown:



In our case Application Crashes Frequently is the template that's used as an example. You can replace the template's name. If you want multiple templates to work in the same way, use the same script under other templates as well and rename the template names.




                  New to ADSelfService Plus?

                    • Related Articles

                    • Account specific request template: Redirection to requester's account based template from default template using FAFR

                      Tested in builds 14000, 14200 and 14201 (Global FAFR): Step 1: In Global FAFR, on form load, configure an FAFR and execute the below script under Action as shown below, try{ $req.form.destroyForm(undefined, false); }catch(err){} ...
                    • Disable Default Template - Using FAFR

                      1. Navigate to Admin>Incident Template>> Edit Default Template  2. Select Field & Form Rules Tab 3. Select On form Load  4. Make sure to select "Applies to Technicians" and set the action as Execute Script and paste the below script  ...
                    • Hide Asset

                      Use case If Technicians want to hide Asset field during template loading, then the same can be achieved using Execute Script option in Field and Form Rules. Solution Edit the incident/service template from which the asset needs to be hidden, choose ...
                    • Customize the category list/selection based on template.

                      The Category applies to all the templates in SDP-MSP. You can hide them using the field and form rules to make them unavailable for users. Under Admin >> Incident Template >> Edit the template in questions >> Field and Form Rules tab. You can create ...
                    • FAFR - How to show only specific categories in a request template

                      Use case There are scenarios where on a particular template only selected categories should be available as an option.  Solution Under Admin >> Incident Template >> Field and Form Rules Tab, create a rule as specified below  Script: ...