How to enable static filter in Service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2020 05:10 AM
Hi All,
I am trying to enable static filter condition in myapprovals list view.
It is using Data Table from Instance Definition widget . I have just cloned the widget and enabled and enabled filter condition.
In the instance option - i have given approverDYNAMIC90d1921e5f510100a9ad2572f2b477fe. So below condition were shown always. Now i would like to restrict modifying the approverdynamicme condition. Like How to make that condition readonly and if they select "All" also it should not remove the static filter condition. Also if the select "Clear All" it should not remove static condition. Can anyone have any idea?
Is there any possibility to hide "New Criteria"? If there is no possibility it should also show approverDynamicMe
Can anyone come across this kind of dynamic filters. Any help would be much appreciated.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2020 05:49 AM
Hi Keerthi
Widget Data table from instance definition is linked with other widget.
If you want to achieve the requirement the follow the below steps:
1. Clone the widget "Filter Breadcrumbs" and assign some id and from HTML line 17
replace <span ng-show="showFilter"> with <span>
2. Clone the widget "Data Table" and assign some id and from Server Script line 176
replace the id of widget with the id of cloned widget in step 1
data.filterBreadcrumbs = $sp.getWidget('widget id of cloned widget in step 1', breadcrumbWidgetParams);
3. clone the widget "Data Table from Instance Definition" and from the server script line 49 replace the id of the widget with the id of the cloned widget in step 2
data.dataTableWidget = $sp.getWidget('widget id of cloned widget in step 2', options);
Now Drag and drop the widget cloned in step 3 in the page designer of the page where you are looking for changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2020 06:58 AM
Hi mr,
Thanks for the quick response.
I have followed your steps.
In the first point as you mentioned given <span ng-show="approverDYNAMIC90d1921e5f510100a9ad2572f2b477fe"> like this but the condition builder is not available after given this condition.
Also if I give click "All" its getting removed. I think I missing something. Can you help me this part.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2020 07:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2020 08:22 AM
Hi Mr,
I am using " Data Table from Instance Definition widget to show the list. In that Data-Table widget is embedded as OOB.
I just cloned the Data Table from Instance Definition widget and also cloned data-table widget to data-table1. After enabling the highlighted lines the filter and condition builder were visible in the page.
So as per your suggestion tried cloning "Filter Breadcrumbs" and made the change but its not working correctly. But i could see in my Data Table from Instance Definition widget is embedded as OOB " data.filterBreadcrumbs = $sp.getWidget('widget-filter-breadcrumbs', breadcrumbWidgetParams);"
var widgetParams = {
table: data.table,
fields: data.field_list,
o: data.o,
d: data.d,
filter: data.filter,
window_size: data.window_size,
view: 'sp',
title: options.title,
page: options.sp_page,
//these two lines add to enable filter in the my approval page
show_breadcrumbs: true,
enable_filter:true,
show_keywords: true
};
data.dataTableWidget = $sp.getWidget('data-table1', widgetParams);
OOB Widgets used :
Data Table
Data Table from Instance Definition