We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Static filter for UI-Builder Dashboard

juebuchner
Tera Contributor

Hello,

 

I created a workspace with the UI Builder that is based on the sc_task table. In this context, the UI Builder also created a dashboard, which of course is based on all entries in sc_task.

However, my dashboard should only concern entries that relate to a specific item. How can I define a fixed filter here (in Zurich)?

 

Kind regards,

Jürgen

1 REPLY 1

Matthew_13
Mega Sage

Hi my Friend,

What UI Builder created for you is just a generic data source against sc_task, so the dashboard is pulling every task. To scope it to one catalog item you need to hard-filter the data resource behind the dashboard, not the widget itself.

In Zurich:

  1. Open the workspace page in UI Builder.

  2. Select the list/dashboard component that’s showing sc_task.

  3. In the right panel, open the Data resource it’s using (Table query / Record list).

  4. Add a condition to the query such as:

    • Request item → Catalog item → is →

Under the hood that’s filtering on:

request_item.cat_item=<sys_id_of_item>

Save and publish — from that point the dashboard will only load tasks tied to that item.

If the item might change later, use a page parameter and bind it to the same field instead of hard-coding the sys_id. Otherwise a fixed filter at the data resource level is the correct approach.

 

@juebuchner - If help you answer, Please mark Accepted Solution.

MJG