on 2017 Nov 20 7:55 AM
Hi Folks,
I created a table with 12 columns and 3 rows. The data will be fetched from oData service Url.
My requirement is "All the columns should be displayed but the rows should be displayed wrt the User"
My table looks like
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
UK
ET
GT
Now, UK, ET and GT should be displayed dynamically. Some users can see only UK, some can see only ET etc.. in all probabilities.
Help me out in solving this.
Regards,
Sindhu
Hi Sindhuja,
You can use below function and inside that function apply filters based on type of user. Use below reference code. Hope this will help.
oTable.attachEventOnce("updateFinished", function(oEvent){
if(usertype == "<value>"){
var oFilter1 = new Filter("<Param>", sap.ui.model.FilterOperator.Contains, "UK");
var oFilter2 = new Filter("<Param>", sap.ui.model.FilterOperator.Contains, "GT");
var oBinding = this.getBinding("items");
oBinding.filter(new sap.ui.model.Filter([oFilter1,oFilter2], false));
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
63 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.