- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ponranjitha
From your screenshot, the Stepper component in UI Builder is not hard‑coded—its Items property is bound to:
Items → stepperData > steps
So you cannot remove steps directly on the Stepper UI.
You must remove/filter the unwanted items from the data array (stepperData.steps) that feeds the stepper.
Below are the best ways to do it (choose based on how your steps are coming).
1) Remove steps by filtering the data (Most common / recommended)
Where to do it
Go to Data and scripts (left bottom panel) → find the data resource / client script that builds stepperData.
Usually it is one of these:
a Client Script that sets stepperData.steps
a Transform / Map script for the data resource
a Scripted data resource returning the steps
What to do
Filter out steps you don’t want (example: remove Review and Canceled).
Example (Client Script / Transform Script)
// stepperData.steps = [{ id: 'new', label: 'New' }, ...]
// Remove specific steps by id (recommended)
const removeIds = ['review', 'canceled'];
stepperData.steps = (stepperData.steps || []).filter(s => !removeIds.includes(s.id));
This will immediately remove those choices from the stepper because the Stepper only renders what exists in steps.
2) Remove steps based on the record’s state model (If steps come from Change state flow)
In Change/Workspace implementations, steps are often generated from state values (e.g., new, assess, authorize, scheduled, implement, review, closed, canceled).
So you can filter using value / state instead of id.
const removeStates = ['review', 'canceled'];
stepperData.steps = (stepperData.steps || []).filter(s => !removeStates.includes(s.value));
Tip: check what your step objects look like (id/value/label) by logging them in a client script.
3) Don’t delete steps — hide them conditionally (Role / condition based)
If you want steps visible only for certain users/roles or conditions:
const isAdmin = (gs.getUser().hasRole('admin')); // server side only
// In UI Builder client side you typically use user roles from session/user profile data.
stepperData.steps = (stepperData.steps || []).filter(step => {
if (!isAdmin && step.id === 'canceled') return false;
return true;
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
somewhat challenging to implement this in SOW
But what's the point in hiding those from Process flow if you are using the state values?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader