Notifications

70 views

Description

Instance Options are not passed correctly to data table widget when "Data Table from instance definition" is used

Steps to Reproduce

1- Login to a Kingston instance and go to Service Portal > Pages .
2- Select The page user_profile , add a container a row and the widget data table from URL defintion to this page .
3- In the newly created widget's instance add the following as Additional options , JSON format :

{
"show_new" : {
"displayValue" : true,
"value" : true
}
}

4- Go to the profile page and use the table parameter : /sp?id=user_profile&table=sys_user

result : The new button is displayed (As expected)


5- Go back to instance in page editor and change the additional options , JSON format to :
{
"show_new" : {
"displayValue" : false,
"value" : false
}
}
6- Go back to the profile page and use the table parameter : /sp?id=user_profile&table=sys_user
result : The new button is hidden (As expected )
--> Instance options are correctly passed to Data Table widget

7- Now go again to instance in page editor (CTRL+click on the data table widget ) and change the widget from "Data Table from URL definition" to "Data Table from Instance definition" use sys_user as table and change the instance options to :

{
"show_new" : {
"displayValue" : true,
"value" : true
}
}

8- Go to the profile page and use the table parameter : /sp?id=user_profile

Expected result : The new button should be displayed .
Actual results : The new button is hidden . The instance options are not passed correctly to the data table widget when data table from instance definition is being used .

Workaround

This issue is under review. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.

 

WORKAROUND: 

In comparing the two widgets, it looks like "Data table from instance definition" is not passing options to data table widget

Adding this block to the data table from instance definition client controller fixes the issue :

if ($scope.data.dataTableWidget)
angular.extend($scope.data.dataTableWidget.options, $scope.options);

 


Related Problem: PRB1244038

Seen In

There is no data to report.

Fixed In

Madrid

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:41:07
Published:2019-02-14