Need a button to export the details as Excel from a List in UI Builder

Devansh00
Tera Contributor
Hi all,
 
I need a button on a list created in ServiceNow UI Builder that allows users to download all cases into an Excel file. Attaching screenshot for your reference. 
 
below image is a pie chart type-
Devansh00_1-1785402099700.png

This below image is list type so there is no such functionality as we have for pie view. 

 
Devansh00_0-1785401865697.png

 

7 REPLIES 7

Devansh00
Tera Contributor

You can refer this image where you can see pie chart, there is a three dots and from there we can see the excel format to download- 

i need the same thing in the Cases tab (the last one )

Devansh00_0-1785417630718.png

 

The things is it is created in home page as record type 

VJ_Srivastava
Tera Contributor

Hello @Devansh00,

This scenario perfectly highlights the architectural shift from classic UI16 to the Next Experience UI Builder. In the legacy UI, list exports were tightly coupled monoliths. In UI Builder, the paradigm is entirely modular and event-driven.

When you need to extend functionality, like adding an export feature to a standard List component, it is critical to follow the platform's composable architecture. I strongly advise against hacking custom API calls into client scripts if it can be avoided. Instead, leverage the Declarative Actions framework.

By defining your export capability as a formal Declarative Action, you decouple the business logic from the UI component itself. This ensures that as ServiceNow pushes updates to their core List components in future releases, your custom export functionality remains upgrade-safe, scalable, and modular across any workspace where that list is deployed. Avoiding technical debt in UI Builder starts with adhering to these event-driven design principles.

NehaG8791370651
Tera Contributor

Hi @Devansh00,

This is a common hurdle when transitioning to the Next Experience! While Data Visualizations have the export functionality bundled nicely in their configurations, the standard List component in UI Builder often requires a bit more manual wiring depending on your current release.

To give your users that "Export to Excel" functionality, you generally have two solid technical approaches:

  1. Declarative Actions (Recommended): The most platform-native way is to configure a List Action (Declarative Action) specifically for the table you are querying. Once configured, this action can be exposed in the list's action bar, triggering the out-of-the-box export payload.

  2. Custom Button & Client Script: If you need a standalone button outside the list, you can drop a Button component onto your page. Map the button's click event to a Page Client Script. That script can dynamically grab the current encoded query from the List component's state and construct a URL to the platform's export processor (e.g., /api/now/table/your_table_name?sysparm_query=...&sysparm_format=excel), executing it via standard window routing.

Just ensure you are dynamically passing the list's filter state into your script so they don't accidentally export the entire table!