Can we limit no of items on each page in Data Table from Instance Definition widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 07:26 AM
I want to know if there is any way we can control pagination to show only 5 items on Data Table from Instance Defination widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 09:33 AM
Hello,
Would you be able to expand on what you are looking to achieve by only showing 5 items?
The Data Table from Instance Definition widget is meant to act similar to the OOB list view, and allow a user to see and filter on data from a particular table. They ended up on that page to access more data, and only having 5 items per page would be a rather frustrating user experience.
If you just want to show 5 or so items to a user, you might want to consider using the Simple List widget. This widget will allow you to control how many items are shown, which can be defined in the Instance Options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 07:27 AM
Hi Paul,
I'm using "Data table from instance definition", but I noticed that the pagination is always 20 rows/page.
On the back office, I set it to 10 rows/page, but on service portal, I always see 20 rows/page.
Is there a way to change that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 12:31 PM
Hi Valerie,
Apologies I am just seeing this. I did not get an email notification for some reason.
In the Widget Instance definition record (sp_instance table), there is a maximum entries field where you can override the default value of 20. This may not be on the Form by default, so you may need to edit the Form Layout and add it.
I quickly tested this and confirmed it works in Jakarta, but noticed it did not work in Istanbul. Some further digging shows the widget-data-table Widget is not grabbing the maximum entries and respecting that in Istanbul.
If you are pre-Jakarta, I would recommend upgrading. Otherwise you will need to clone the widget-data-table widget and make some adjustments.
For folks needing to make this work pre-Jakarta, look for line 24 in the Server Script of widget-data-table. You will notice:
optCopy(['relationship_id', 'apply_to', 'apply_to_sys_id']);
You need to edit that to add 'window_size'. Your updated line should read:
optCopy(['relationship_id', 'apply_to', 'apply_to_sys_id', 'window_size']);
This will make the widget respect the specified 'maximum entries' field from the Instance definition record.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 09:43 AM
Thanks I will looking into simple list widget.