- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2022 12:25 AM
Hi,
I'm trying to show data using the data-table widget on my PDI.
I've cloned the OOB data table widget.
The table is a custom table and I'm calling it from the portal widget with options set etc.
The problem is that the widget is visible on the page and the data is there, I have logged the results to the console log so there is 20 rows of data (with selected fields) but the the widget just loads and only shows the menu for exporting data and no actual data rows are shown.
Can't get my head around why the data is not being printed out.
Any ideas?
I'm using admin to test this so it should be a access issue.
Br,
Toube
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2022 04:27 AM
in HTML
<div class="row borderLeftRight">
<div class="col-xs-12 col-md-12" ng-hide="logIsEmpty" style="padding-top: 15px; color: #000; border-top: 1px solid #ddd;">
<sp-widget widget="data.dataTableWidget"></sp-widget>
</div>
</div>
In Server
var widgetOptions = {
"table": "u_mountainbikestats",
"view": "default",
"p": 1,
"o": "u_ride_date",
"d": "desc",
"filter": "u_bike.u_ownerDYNAMIC"+data.userid,
"fields": "u_bike,u_ride_date,u_location,u_time,u_km",
"table_label": "MountainBike Ride Stats",
"table_plural": "MountainBike Ride Stats",
"show_breadcrumbs": true,
"enable_filter": true,
"filterACLs": true
};
data.dataTableWidget = $sp.getWidget('mtb-data-tables', widgetOptions);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2022 04:27 AM
in HTML
<div class="row borderLeftRight">
<div class="col-xs-12 col-md-12" ng-hide="logIsEmpty" style="padding-top: 15px; color: #000; border-top: 1px solid #ddd;">
<sp-widget widget="data.dataTableWidget"></sp-widget>
</div>
</div>
In Server
var widgetOptions = {
"table": "u_mountainbikestats",
"view": "default",
"p": 1,
"o": "u_ride_date",
"d": "desc",
"filter": "u_bike.u_ownerDYNAMIC"+data.userid,
"fields": "u_bike,u_ride_date,u_location,u_time,u_km",
"table_label": "MountainBike Ride Stats",
"table_plural": "MountainBike Ride Stats",
"show_breadcrumbs": true,
"enable_filter": true,
"filterACLs": true
};
data.dataTableWidget = $sp.getWidget('mtb-data-tables', widgetOptions);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 10:29 PM
Got the solution, adding it as it may be helpful for others. In client script there is code related to server.update() which is making the service script execute for second time unnecessarily, removing that is fixed the data table widget. It is now renders even with the only input.