on 07-27-2021 5:49 AM
I'm using SAPUI5 Fiori List Reports based on List Report Templates and CDS.
I managed to set the Filter ValueHelp Include Range Operations via attachValueHelpRequest and it seems to be working.
Update: If you open the ValueHelpDialog a second time it generated a loop. This has been fixed by only setting the prototype.test function if it's null or undefined.
onInitSmartFilterBarExtension: function (oEvent) {
var oSmartFilterBar = oEvent.getSource();
oSmartFilterBar.getControlByKey("YourFilterName").attachValueHelpRequest(this.onValueHelpRequest, this);
},
onValueHelpRequest: function() {
if (sap.ui.comp.valuehelpdialog.ValueHelpDialog.prototype.test == null) { //second time sets test=fntest2 which causes a loop
sap.ui.comp.valuehelpdialog.ValueHelpDialog.prototype.test = sap.ui.comp.valuehelpdialog.ValueHelpDialog.prototype.onAfterRendering;
}
var fntest = function(oEvent){
this.test(); //call original onAfterRendering
var vId = this.getId();
if (vId.includes("YourFilterName")) {
var oId = sap.ui.getCore().byId(vId);
if (oId) {
oId.setIncludeRangeOperations(["EQ"],"numeric");
}
}
}
};
sap.ui.comp.valuehelpdialog.ValueHelpDialog.prototype.onAfterRendering = fntest;
},
Unfortunately you can still manually enter different Filter Operations (e.g >=0).
Is there a simple way to prevent this?
User | Count |
---|---|
65 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.