Closed amien90 closed 5 years ago
hi @amien90, yes. I will add it.
Add button: js/properties.js, Line 138
enabled: {
ref: "npsod.conn.enabled",
label: "Enabled",
type: "string",
expression: "optional"
}
Add Enable / Disable watch, nprinting-sense-on-demand.js, Line 540
$scope.$watch('layout.npsod.conn.enabled',
function ( newVal, oldVal ) {
if(newVal == 'disabled' || newVal == 'false')
{
outterObj.find('.npsod-export-btn').attr('disabled','disabled');
}
else
{
outterObj.find('.npsod-export-btn').removeAttr('disabled');
}
}
);
Hi @amien90 ,
now it should be possible by adding under 'Appearance->Display->CSS Conditional Class' something like this example:
if(GetSelectedCount(Year)=0, 'disabled')
Andrea
Thanks All
Can you make the On-Demand button greyed out if a specific condition is not met? i want to disable the On-Demand button when the selected report contains > 1.000.000 records for example. Just to prevent that end-users click on the on-demand button why accident with too many records selected.
Thanks in advanced