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.