Custom Module-Based Dependent Fields with FAFR

Custom Module-Based Dependent Fields with FAFR

In the dynamic world of IT service management, form simplicity and accuracy play a major role in how smoothly requests are handled. However, many organizations face a recurring challenge—dependent field limitations within ServiceDesk Plus.
Currently, the system supports dependency only between Category, Subcategory, and Item fields. But what if your use case involves a different field structure—like Zone → Region → District → Cluster or Product Type → Model → Part Number? Unfortunately, existing additional fields don’t offer native support for creating such dependencies.

💡 The Solution: Field and Form Rules (FAFR) with Custom Module-Driven Data
To bridge this gap, we recommend leveraging the power of Field and Form Rules (FAFR) combined with structured data from a custom module.
This approach unlocks powerful new capabilities:
✅ Define multi-level dependent fields based on real-time user selections
✅ Build dynamic dropdowns without requiring custom modules
✅ Use easily updatable Custom Module to map thousands of combinations
✅ Improve accuracy, speed, and user experience on every form

🛠️ How It Works
  • Prepare a CSV that maps your dependency levels (e.g., Zone → Region → District → Cluster).
  • Import this data in a Custom Module or use it directly in the script logic.
  • Configure Field and Form Rules to filter child field options based on the selected parent.
  • Deploy the logic in your request template—and watch your forms respond dynamically!

🚀 Why This Matters
By shifting to the Custom Module + FAFR approach, you're not just working around system limitations—you’re enabling smarter, cleaner, and highly scalable forms. Whether you're in Facilities, HR, IT, or Procurement, this method delivers context-aware interactions that improve form accuracy, reduce manual errors, and enhance service delivery.

🔍 Implementation Approaches
There are two primary methods to implement dependent field logic:

🛠️ How to Set It Up
1. Define the Additional Fields
Start by adding the following single-line additional fields in your request template:
  • Zone – Will be transformed into a picklist (with values sourced from a CSV)
  • Region – Dependent on the selected Zone
  • District – Dependent on the selected Region
  • Cluster – Dependent on the selected District

These fields will function as cascading picklists, where each selection dynamically filters the next.
2. Create the Custom Module
Admin > Custom Module > New

Add 4 custom additional field.
  • Zone – Single Line field -Primary Data
  • Region – Single Line field, Dependent on the selected Zone
  • District – Single Line field, Dependent on the selected Region
  • Cluster – Single Line field, Dependent on the selected Distric
Set permission for the newly created module. Ensure requesters have view permission.
3. Import Data into Custom Module:
  • Navigate to the created custom module
  • Click on import
  • Select the CSV from which the data has to be imported.
  • Make sure the headers match the field names in the module.

4. Implement the Script Logic
  • Download the script provided with this article.
  • Go to your desired Request Template → Field and Form Rules → On Load → New Rule
  • Paste the script into the editor and update the field names to match your actual Request Additional Fields.
📌 Make sure the Custom module field names exactly match the column names used in the script.
💡 Need help finding the field names?
  • In the FAFR editor, simply start typing the field label—it will auto-suggest the corresponding field name.
  • In Custom module, we can see the Field Names in the Field List tab.

5. Activate the Script
  • Set the script to execute On Form Load
  • Once configured, the script will dynamically convert your single-line fields into smart picklists, loading values from the CSV file based on user selections—creating a seamless, responsive form experience.

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to diff of two Date& Time fields using FAFR

                      If you have two date and time additional fields or default fields, and if you want to capture the difference between those two fields in Hours and minutes, then use the below script to capture the value in an additional field, Under the respective ...
                    • Script to set fields from CSV using FAFR.

                      Works in 10604 Requirement: Load Data from CSV depending on the value selected in an additional field. Usecase: Assume there are 3 additional fields for a request template, namely, "Reference number", "Payment type and "Vendor". "Reference number" is ...
                    • Risk Matrix for Change using Custom Module

                      Overview: A risk matrix helps in identifying risks based on how likely they are to happen and how serious their impact could be. This makes it easier to decide which risks need urgent attention and which ones can be watched over time. It helps manage ...
                    • Dynamic loading of field data from an external CSV file

                      Requirement: Load data to additional fields dynamically from an external CSV file based on another field value. Usecase: Assume, a request template includes three additional fields: 'Client Code,' 'Client Name,' and 'Client Address.' When a pick-list ...
                    • Script to Populate User Additional Field under Incident Template using FAFR

                      The script load the Requester Name under Incident Additional field ( As a pick list), by choosing the requester name under additional field the script populates the user additional field value. * Kindly create two additional fields under Admin -> ...