
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2016 01:46 PM
I'm using a simple list widget to display the logged in user's open requests (these are actually record produced tasks). The list displays perfectly and I've set the limit to 10. After 10, it displays View All. When I click View All, it displays a different list with columns that we don't want displayed. Any idea, how to edit the list of columns? I've tried changing the view on the widget instance to default view and self service to match the backend views, but this does not make a difference. Any help would be appreciated. Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2016 07:19 PM
Hi Greg,
I took a quick look at the list page with the "Data Table from URL Definition" widget. I was unable to find where the default columns are defined.
However, you can specify a specific view to use when using the "Data Table from URL Definition" widget. From there, you have two options (both requires cloning and modifying an OOTB widget).
1. Update the "Data Table from URL Definition" widget to use a default view of your choosing. In the server script, replace the following line:
data.view = $sp.getParameter('view');
with
data.view = $sp.getParameter('view') || 'default';
I did put default (which will use the default view in the system) but you could use "ess" or something else. That way if no view is specified as a parameter, this view will be used instead of the view that I can't find where it is defined.
Then, update the list page with the page editor to replace the OOTB widget with the new cloned widget.
2. Update the "Simple List" widget to pass a default view when pressing on "View All". In the client script, add the view parameter to the see all function:
this.seeAll = function(){
$location.search({
id: c.options.list_page_dv || 'list',
table: c.options.table,
filter: c.options.filter,
view: c.options.u_view || 'default' //Setup an option for your custom Simple list if you want to be able to specify the view in the widget instance
});
};
Then, update your page that are using the Simple List with the page designer to replace the OOTB widget with the new cloned widget.
Personally, I have a preference for the second option which would allow you to setup a new option that will chose the selected view for each widget instance. To do so, simply create a new field with the column name "u_view" on the "sp_instance_vlist" table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 03:58 PM
Hi Greg,
We have patch 2 in our business instance so I looked to the view field. This seems to be new as of patch 2. I looked into the widget itself and found out the view was only used to be applied as a parameter for the form view when you click on a specific record (that is if your record is rendered using the "Form" widget.
So your only option is to use the custom widgets I did propose. I would suggest that, if you take the option of updating the "Simple List" widget, that you use the same view field to determine the list layout view. The view is passed as a reference field so you would need to retrieve its name with a GlideRecord in server script:
var options.view_name = "default";
if (options.view) {
var viewGR = new GlideRecord("sys_ui_view");
viewGR.get(options.view);
options.view_name = viewGR.getValue("name");
}
You could then use the same script I proposed using options.view_name instead of options.u_view.
I again tried to find out where the default list layout is taken from without success (I did try to setup a list layout view using the "sp" view name, "sp_overview" view name and another few without success. I think this might be hard coded in the Java $sp object which we don't have access to. Again, lack of documentation over there...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 05:17 AM
Hey Laurent,
Thank you for your insight and expertise on this. It has been very helpful. Perhaps, I'm even overcomplicating this, since I only want to provide users with a list of their open records (incidents, requests, etc.) without displaying fields that aren't relevant. Thanks again for all the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2016 09:46 PM
Hello Laurent,
It was very helpful solution. I am not able to add the new 'Data Table from URL Definition' widget in the 'List' Page.While trying to do through the designer nothing is populating.
How can we add this new widget through page editor?
Thanks
Saranya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2016 05:56 AM
Hi, I don't know if this as change but I was also not able to open the list page in the designer. However in the page editor, I was able to open it and there is an option to change the widget being used. URL path: /sp_config?id=page_edit&p=list&table=sp_instance_table&sys_id=bc574770d7000200a9ad1e173e24d42c&spa=1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2016 09:59 PM
Hello Laurent,
Thanks for the Information.It was very helpful.
Do you know how we can hide the new button from list of incidents?
Thanks
Saranya