Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Software Assett Workspace - Record Badge Count

DaveS1038640130
Tera Contributor

Hello Community!

 

I have a requirement to add a count to a tab on Software Entitlement in the Software Asset Workspace.

 

"To keep consistency, a count should be added to the Contracts tab on Software Entitlements"

 

Screenshot 2026-04-08 132513.png

I believe that I need a (#) next to the Contracts tab (Contracts (#))...just like the "Expense Lines (#)" tab as seen in the image above.

 

I believe this is called a Record Badge Count, but am not certain.

 

I am in UI Builder, in the Software Asset Workspace scope, but can not figure out where to find the Tabs container.  I think I just need to activate Record Badge Count for the Contracts tab, but I seem to have reached a blocker here.

 

Any help or point in the right direction would be appreciated...

 

Thank you!

 

 

 

 

 

 
 
 
 

 

 

 
 

 

 

 

 

4 REPLIES 4

Naveen20
ServiceNow Employee

 

Finding the Tabs and Enabling the Badge Count

The tabs you see on a record page in Software Asset Workspace aren't a simple "Tabs container" you can click on directly in the content tree. They're driven by the Record Tabs (or Tabbed Content) component within the record page variant. Here's the path to get there:

1. Navigate to the correct page variant

In UI Builder, open the Software Asset Workspace experience, then find the Record page for the alm_license (Software Entitlement) table. Make sure you're on the correct variant that matches what you see at runtime — there may be multiple variants based on conditions.

2. Locate the tabs configuration

In the content tree on the left, look for a component named something like "Tabbed content", "Record tabs", or a "Tab set" nested inside the page layout. It might be buried a few levels deep inside layout containers. Expanding all the nodes in the content tree is the fastest way to find it. You can also try clicking directly on one of the tabs in the preview canvas — UI Builder should highlight and select that component in the tree.

3. Configure the badge count on the Contracts tab

Once you find the tab definition for "Contracts," look in its configuration panel (right side) for a property related to the record count or badge. The exact approach depends on how the tabs are built:

  • If using declarative "Related Lists" or "Record Tabs" component: There's typically a configuration per tab where you can toggle a "Show record count" or "Badge" property. Enable it, and it will query the related list and display the count automatically.

  • If using a manually configured Tab Set: Each tab pane may have a badge or label badge property. You'd bind it to a data resource that returns the count. For example, create a Look Up Records data resource that counts ast_contract_instance records where software_entitlement = current record sys_id, then bind the badge property to {{dataResource.rowCount}} or the equivalent output.

4. The data resource approach (most common)

If there's no built-in toggle, this is the typical pattern:

  • Add a Data Resource → "Look up records" on the ast_contract_instance table (or whichever table backs the Contracts related list), filtered by the current record.
  • In the tab's config, bind the badge property to the data resource's total count output.
  • The badge will then render as "Contracts (1)" just like Expense Lines.

5. Check the Expense Lines tab as a reference

Since "Expense Lines (1)" already works, select that tab in the content tree and inspect its configuration. You'll see exactly which property is used and how it's wired — then replicate the same pattern for the Contracts tab.

Quick Tip

If you're having trouble finding the component in the tree, use Ctrl+F in the content tree (if available) or try the Outline view. Another approach: open the browser DevTools at runtime, inspect the tab element, find a data-component-id or similar attribute, and search for that in UI Builder — it can help you pinpoint the exact component.

This should get you unblocked. The key insight is that the count badge is a property on the individual tab pane configuration, not a global setting on the tab container itself.

Hello all,

Thank you, Naveen20 for such a detailed response....unfortunately, I can't get anything to work for the requirement I need.

 

As per my previous question, the "Contracts" tab is not a Related List, but a SAM Workspace Record Tab.  There is no configuration toggle for "Show record count" or "Badge" property.

 

I have created a Data Resource (Aggregation Query 1), and have tried dragging the "Count" pill to the Page Collection (SAM workspace record tabs) both in the "Selected tab index" and "Selected tab" fields, respectively, and then binded the data to the field.  This did NOT work.

 I can not figure out how to get a badge count on the "Contracts" SAM Workspace Record tab.  

I have tried the steps in the previous community response to no avail.  

 

I feel like I am missing an easy step somewhere?

 

Are they're any other suggestions I can try?

 

Thank you all! It is very appreciated!

 

Screenshot 2026-04-17 132319.png

Screenshot 2026-04-17 135044.png

 @DaveS1038640130 
Just check the SRP record page implementation in the ui builder and follow the same as how it is being done for Expense lines as it is showing count. The related list should have the title as in screenshot.

DaveS1038640130
Tera Contributor

Hi Naveen20.

I can't get this to work. The Contracts tab is not a related list.  It is a SAM Workspace Record tab,  a Related List tab has a different configuration.

 

These are my current steps:

DaveS1038640130_0-1776791313229.png   > 

DaveS1038640130_1-1776791408299.png   >   

DaveS1038640130_2-1776791745328.png   >   

DaveS1038640130_3-1776791832781.png   >  

DaveS1038640130_4-1776791924471.png

From here I have tried:

-Clicking on Settings, Edit content, and Sub-pages & Pages

 

-Creating Aggregation Query - I have created a Data Resource (Aggregation Query 1), and have tried dragging the "Count" pill to the Page Collection (SAM workspace record tabs) both in the "Selected tab index" and "Selected tab" fields, respectively, and then binded the data to the field.  

 

Have you been able to add a badge count to a SAM Workspace Record tab in the past?  If so, would you be able to show me an example?  Perhaps I could reference that?

 

Thank you for your help, and I apologize if I not seeing or understanding something correctly?