Simple list widget to display catalog items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2022 11:50 PM
Hi,
I have a question regarding the simple list widget. We are using simple list widget for displaying catalog items. Some of the catalog items in the widget have Available for conditions (To display only certain group). So how to implement that condition in the widget list?
Example:
User A belongs to Network group but User B is not belongs to that group
User A logged in to the portal in the simple list widget user can able to see Item 1, Item 2, Item 3
User B logged in to the portal in the simple list widget user can see only Item 1, Item 3.
Item 2 has condition to display only for Network group members
Thanks!
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 05:23 AM
There a few different ways to tackle this.
- If you are able to filter the list via a list view that would meet your requirements then do that and use that query in the options of the Simple List widget (this would be the easiest if possible). If it can't be done then the Simple List widget doesn't support that type of configuration and you'll have to try one of the other options below
- Install the "Service Portal User Criteria Support" plugin
- It's a free plugin
- It allows you to use User Criteria on the widget instance to control when a widget should display/hide
- For this you would have to create the different scenarios for the simple list widget applying the User Criteria for each scenario
- Create a Custom widget and embed the OOB Simple List widget
- Using a script (Server side, Script Include, or other ) to determine when and what catalog items to show
- With that information pass the filter to the embedded Simple List widget via options
- Here is some basic information on embedding widgets: https://serviceportal.io/docs/documentation/widget_embedded.md
- Clone the Simple List widget and modify to meet your requirements
- Or Create a whole new custom widget to meet your requirements
