Adding Date Filters

SathiyanathJ
Tera Contributor

I need a best‑practice way to add a Start and End Date filter in UI Builder. The idea is to place a date picker (filter component) on the visualization page, and when a user selects a date, the report’s data source should update to only show records after that date. means pass the start and end date to visualization (horizontal/vertical bar chart) 

2 REPLIES 2

Tanushree Maiti
Mega Patron

Hi @SathiyanathJ 

 

Refer links: 

Add a date range or date picker field in UI builder 

https://www.youtube.com/watch?v=UpYPilXnzpo

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:
Demonstrates the Date-Time components available for UI Builder in the Vancouver release. Chapters: 00:00 Intro 00:14 Date-Time component 00:37 Date-Time-Interval component 01:12 Configuration options #servicenow #servicenowdemo #uibuilder #datetimecomponents This video was recorded in the ...

Bill Martin
Giga Sage

Hi @SathiyanathJ ,

 

I have established a comprehensive set of functional and non-functional best practices guidelines tailored for implementing a dynamic date filter within UI Builder while maintaining a robust platform architecture. This framework ensures that visual components remain highly performant, data integrity is strictly enforced, and development velocity is maximized through strategic asset reuse.


1. Frontend Configuration and User Experience

  • Dynamic State Management: Utilize page level client state parameters to capture and pass date inputs dynamically to horizontal or vertical bar chart data sources, ensuring immediate visualization updates based on user selection.

  • Proactive Client Side Validation: Embed UI layer validators to enforce that the start date always occurs prior to the end date, preventing broken queries and safeguarding the workspace from infinite loading states or blank reports.

 

2. Enterprise Architecture and Non-Functional Standards

  • Modular Reusability: Design the filter as a global feature from the outset. This transforms the component into a reusable build asset, ensuring that the investment effort is done only once and the component can be deployed seamlessly across multiple workspaces.

  • Database Integrity via Business Rules: Employ Business Rules to handle crucial logic required before data is inserted or updated in the database. This guarantees backend consistency completely independent of frontend UI behavior.

  • Automated Integration via Flow Designer: Leverage Flow Designer as the primary engine for broader platform integrations, actions, and delayed triggers, maximizing operational reliability for processes tied to the visualized data.

 

In addition, i have created this playlist that you maybe able to benefit from using the Zurich vesion.

 

 

Please mark as helpful or accept as solution if you find the response lucrative

 

Master ServiceNow Dashboards and Reporting in the Zurich release with this comprehensive full course. Whether you are a ServiceNow Administrator, Developer, ...