catalog item form design

iwsservicen
Tera Contributor

 Request for Help: Dynamic Dropdowns in ServiceNow Catalog Forms

Hi General 👋,
We need assistance with creating ServiceNow catalog forms that include dynamic dropdown functionality. Our requirements are:

  • Dropdown values should come from a CSV file 📂.
  • Dropdowns should be dependent on each other 🔄. For example:
    • If a user selects a Subscription in the first dropdown, only the Resource Groups under that subscription should appear in the second dropdown.
    • If a user selects a Resource Group, then only the VMs under that resource group should appear in the third dropdown.

Is this achievable in ServiceNow? If yes, could you guide us on the best approach or share any relevant documentation or examples?

Thanks for your support! 🙏

 

Requirement for ServiceNow Form Development

Overall Objective

We need to evaluate and finalize a standard, non‑hardcoded, scalable approach for passing input values into a ServiceNow form and dynamically filtering dependent fields (e.g., Country → State → District). Once the approach is finalized, we will proceed with form development after aligning with the backend team.


Detailed Requirements

1. Identify all feasible approaches for populating values in a ServiceNow form

We must explore different approaches to:

  • Pass input values into the form
  • Dynamically load values into dropdowns or reference fields
  • Avoid hard-coding
  • Maintain a clean, scalable, and maintainable configuration

2. Finalize the standard approach (commonly used in ServiceNow)

Our goal is to choose a method that:

  • Follows ServiceNow best practices
  • Works well for dependent selections (Country → State → District)
  • Supports default or null values when the form loads
  • Avoids any hardcoded scripts or static choice lists whenever possible
  • Is widely adopted and proven to be maintainable

Example requirement:

  • If Country = India, show only Indian States.
  • If State = Delhi, show only Delhi districts.
  • When the form loads for the first time, finalize how default or null values should be displayed.
 

 

1 REPLY 1

Matthew_13
Kilo Sage

Hi my Friend

Yes, this is achievable in ServiceNow, and there is a well-established, scalable way to meet these requirements without hard-coding values.

Overall objective
You should first agree on a standard, non-hardcoded approach for passing input values into a catalog form and dynamically filtering dependent fields (for example, Country → State → District). Once this approach is finalized and aligned with the backend team, we can proceed confidently with form development.

Recommended and commonly used approach

  1. Populate values via data, not code

  • Dropdown values should come from tables populated by CSV imports Import Set + Transform Map, or Scheduled Import if the data changes.

  • This avoids hard-coding and keeps the solution scalable and maintainable.

  1. Model dependdencies in the data layer

  • Use a hierarchical data model, such as:

    • Country table

    • State table references Country

    • District table references State

  • This pattern is widely adopted in ServiceNow and works well for cascading selections.

  1. Use Reference variables for dependent fields

  • Build the form using Reference-type variables, not static choice lists:

    • Country → references Country table

    • State → references State table

    • District → references District table

  1. Filter dynamically using reference qualifiers

  • Apply reference qualifiers so dependent fields filter automatically:

    • If Country = India, only Indian States are shown

    • If State = Delhi, only Delhi Districts are shown

  • This keeps the logic declarative and avoids custom scripts wherever possible.

  1. Handle default and null values cleanly

  • On initial form load, dependent fields should remain empty or null until a parent value is selected.

  • Lightweight onChange catalog client scripts can be used only to:

    • Clear dependent fields when a parent value changes

    • Prevent stale or invalid selections

I think this is good approach because: 

  • Follows ServiceNow best practices

  • Avoids hard-coded values and static choice lists

  • Scales well as data grows or changes

  • Is widely used and easy to maintain

  • Clearly separates data management (backend) from form behavior (frontend)

Happy to share concrete examples or reference qualifier snippets once the table structure is finalized.

 

@iwsservicen - Please mark as Accepted Solution and Thumbs Up if you found Helpful!!