Custom Condition and Formula Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
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:
Product ID Column_1 Amount Column_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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
what's your actual business requirement here?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Ankur Bawiskar Thanks for your response. The business requirement is we have N number of source tables and for each customer we get different field definition for incoming data so we have degined our schema in flexible way without fixed field names so Data lake table has generic columns like column 1, column 2......etc and in another mapping table, we have defined mapping between actual field and fields from Data lake table.
Now on another table, where we need to give flexibility for our user admins to write Rules where they can define Rules with conditions to filter the data from Data lake table which will eventually be used in backend as addquery on the Data Lake table for further calculation. On this Rule table, i want to show a condition builder which shows the derived (logical field names) in the field picker, not the actual column names from the DATA LAKE table i.e. column1, column2......etc. Further more details, I have provided in my post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
you are going in too much customization which is not good.
It will lead to technical debt over period of time and will also have issues maintaining this much customization
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
