Custom Condition and Formula Builder

UpmaR
Tera Contributor

Hi,

I am looking for guidance on implementing a custom Condition Builder  in ServiceNow.

 

Background:

I have already explored the out-of-the-box Condition Builder, which is tightly coupled to a specific table and allows conditions to be created only on that table’s fields. However, my requirement goes beyond this standard behavior.

 

Requirement: Custom Condition Builder

I need a custom condition builder with the following capabilities:

  • Allow user admins to build conditions using AND / OR expressions

  • Allow selection of logical fields that are not directly tied to the physical column names

  • Support backend filtering of data based on conditions defined by user admins

Data Model Overview

  • DATA table

    • Stores actual data

    • Column names are generic, such as: Column_1, Column_2, Column_3, etc.

  • MAPPING table

    • Stores user-friendly display names mapped to DATA table columns

    • Example:

    Display Name Mapped Name
    Product IDColumn_1
    AmountColumn_2
  • RULE table

    • Used by admin users to define rules and conditions

    • These conditions will later be evaluated in the backend to filter records from the DATA table

Problem with Existing Condition Builder

  • If I use the Condition Builder on the MAPPING table, it only shows physical fields like Display Name and Mapped Name

  • If I use it on the DATA table, it exposes technical field names such as Column_1, Column_2, etc.

  • What I need instead is for the condition builder to display logical field names like Product ID, Amount, etc., while still evaluating conditions against the mapped DATA table columns in the backend

Expected Behavior

When an admin defines a condition:

  • The field picker should display values from the Display Name column of the MAPPING table (e.g., Product ID, Amount)

  • Internally, the condition should resolve to the corresponding DATA table columns (e.g., Column_1, Column_2)

Could you please suggest an approach or design pattern in ServiceNow to achieve. Any guidance on schema design, UI Builder / Service Portal implementation, or backend evaluation strategy would be greatly appreciated.

#Sales and Order Management #UI Builder #Customer Service Management #NextExperience

0 REPLIES 0