on 2024 Jan 08 11:22 AM
I have a scenario where DataTable Row items style needs to be shown in different colors based on status. Even though the Rule is returning correct style, still all items are being displayed in same color ie. the color of 1st item.
{"Value": "{status}", "DisplayType": "Text","NumberOfLines": 2,"TextAlignment": "left","Styles": { "Text": "/Parle_CRM_Approvals/Rules/RequestsStyleApprovalStatus.js" }}
Hi Girish,
the style properties seem to be wrong. Instead of font-color you need to use color. You can check following page for details: https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/features/fiori-...
BR, Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response kucki99, but the issue is still there.
.DataTableTextItem_Pending { color: #f1d54a; font-style: body; font-size: 13;} jitendrakumar.kansal
export default function RequestsStyleApprovalStatus(context) {
var code = context.binding.status_code; var style = "DataTableTextItem_Default"; if(code==null || code ==="" ) return style switch(code){ case "P": style="DataTableTextItem_Pending"; break; case "A": style="DataTableTextItem_Approved"; break; case "R": style="DataTableTextItem_Rejected"; break; case "H": style="DataTableTextItem_Hold"; break; } return style;}
This appears to be a bug to me. Please open a support ticket for further investigation. See here for the details.
The issue has been addressed in MDK 23.8.7 release. You can download it from SAP service marketplace.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.