Apply filter on "Data Table from URL Definition" widget?

aryandelhi
Kilo Contributor

Is it possible to apply filter on "Data Table from URL Definition" widget in ServicePortal.

For example, display only logged-in user's results.

Thanks!

1 ACCEPTED SOLUTION

chiragbagdai
Mega Expert

Hi Arayn,



Have you tried adding "&filter=active=true^opened_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe" condition in the URL ?



I believe you can access below attributes by just adding them in the URL of page:



['table','field_list','filter','order_by', 'order_direction','order']



Regards,


Chirag


View solution in original post

6 REPLIES 6

In case this helps someone, here's an example of a URL when using the [Data Table from URL Definition] widget:




https://your_instance.service-now.com/the_sp_suffix?id=the_sp_page_id&table=sc_req_item&view=ess&fil...




where:


Portal Suffix: the_sp_suffix


Page ID: the_sp_page_id


Table: sc_req_item


Filter: active=true^opened_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe


View: ess


Order by Number, Descending: &o=number&d=desc


This doesn't work on my version

I agree with larstange. You'll need to copy the widget, add it to a page in place of the list page, remove the line "deleteOptions(['table..." or at least remove the parameters from that function call that you want to keep.

I removed filter from that function call and now it works fine