Using sysparm_fixed_query as a filter in "Data table from Instance Definition" widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 07:08 AM
Hi,
I want to add in a widget something like "sysparm_fixed_query" used in the backend of ServiceNow.
I use a copy of "Data Table From Instance Definition" widget and add some parameters for the other widget that is called:
data.table_label = gr.getLabel();
var widgetParams = {
table: "sn_customerservice_case",
fields: data.field_list,
o: "state",
d: data.d,
filter: "account=" + gr2.getValue("account"),
window_size: data.window_size,
view: 'sp',
title: options.title,
show_breadcrumbs: true,
enable_filter: true
};
data.dataTableWidget = $sp.getWidget('widget-data-table', widgetParams);
Is there a way to add some parameter that will apply my fixed query and it couldn't be removed? Or what should I change?
NOTE: I don't want to hide the filter/breadcrumbs, I just want to fix part of the filter and the user to be able to add more conditions, but not to remove mine. So in this case... show_breadcrumbs to false or enable_filter to false won't work.
Thanks in advance!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 07:31 AM
you already have filter set which is good, but you should be able to set show_breadcrumbs: false into your widget parameters to get the filter to hide so they can't change it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2018 12:24 AM
Thanks for the replay! But I wrote in the note above that I don't want to hide my filter or breadcrumbs, I just to modify them in order to the user to BE ABLE TO ADD more filters, but NOT TO REMOVE my filter, the one I have already added.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2018 04:03 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2018 04:40 AM
Hi,
Found any solution/workaround for this? I have the similar need.