- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2022 07:32 PM
I customized the "Data Table from Instance Definition" widget to implement the filter.
I would like to hide the "load filter" and "save filter" buttons when using filters.
Is this implementable?
I implemented the filter by adding the following to the server script of the "Data Table from Instance Definition" widget:
Others are not customized.
"options.enable_filter = "true";"
Also, I have another similar question, is it possible to display only the necessary items in the pull-down menu when specifying a field in the filter?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2022 10:02 PM
Funny seeing this post... I'm working on the same thing right now. I've managed to enable the filters the same way, hide the buttons for save/load filters, add/remove filters, and clear all filters buttons through CSS on the page I put the customized widget on. I could apply it to a CSS include on the theme, but I don't want it applied globally on the specific portal.
.remove-conditions-row {
display: none;
}
.add-conditions-row {
display: none;
}
.new-criteria {
display: none;
}
.filter-footer {
display: none;
}
.filter-header span {
display: none;
}
My next step is to disable click events on the first column of dropdowns where users can select which fields to filter. I've done that with CSS for <a> tags before, but not for the dropdowns so I will reply back tomorrow once I've figured it out.
As for the actual choices they can filter to... I haven't found a way to do that yet. I have filters on fields in forms that return correctly so choices are excluded there, but filters on the list view do not seem to work the same way. I did read that maybe row level ACLs would accomplish this, but I'm not having any luck with that right now.
I hope this gets you started! Ttyl!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2022 10:02 PM
Funny seeing this post... I'm working on the same thing right now. I've managed to enable the filters the same way, hide the buttons for save/load filters, add/remove filters, and clear all filters buttons through CSS on the page I put the customized widget on. I could apply it to a CSS include on the theme, but I don't want it applied globally on the specific portal.
.remove-conditions-row {
display: none;
}
.add-conditions-row {
display: none;
}
.new-criteria {
display: none;
}
.filter-footer {
display: none;
}
.filter-header span {
display: none;
}
My next step is to disable click events on the first column of dropdowns where users can select which fields to filter. I've done that with CSS for <a> tags before, but not for the dropdowns so I will reply back tomorrow once I've figured it out.
As for the actual choices they can filter to... I haven't found a way to do that yet. I have filters on fields in forms that return correctly so choices are excluded there, but filters on the list view do not seem to work the same way. I did read that maybe row level ACLs would accomplish this, but I'm not having any luck with that right now.
I hope this gets you started! Ttyl!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2022 05:34 AM
.save-filter-btn{
display: none;
}
.load-filter-btn{
display: none;
}
Thank you for answering!
By adding the above to the CSS of the widget, we were able to remove only the target button! !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2022 08:00 AM
As promised! I wanted just the first column of buttons disabled so the selected fields could not be changed. This was accomplished with the following:
.field-list-button {
pointer-events: none;
}
Simply, I've provided a set list of fields the intended users can use to filter by via adding the filters as [Field] [is anything] and stopped them from changing them in the dropdowns via CSS. They can only change the operators and the values.
You can use that pointer-events: none; part to prevent click events on <a> tags as well (which I do to prevent routing to pages via breadcrumbs). Just find the right id, class(es), elements, or combinations of these and you're good to go. I usually inspect the specific page element and work up from there to find the most unique hierarchy if a unique id/class is not available for the element(s) I need controlled.
Still no success on the actual list of values available for the selected fields that offer choices or references. Although, I've added specific field filters so references like Location and <Record> are dot-walked to the Name or Number field so a suggestion list doesn't populate and allow for the use of the [is one of] operator. ACLs prevent viewing the records so the generated list does not include them even if they type them in.
(NOTE: None of what I've provided prevents adding via 'Show Matching' or 'Filter Out' on the list view. Not a concern for me, but just a behavior to be aware of.)