- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Dear experts,
I would like to know how do I configure the background label colour for a field to be like this?
Currently my script is like this but it does not show the color like the background I wanted above. How do i change my script so that my field whole background becomes red or green instead of gray now.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I do not think issue is with style or client script. Check your business rule where you set field value of 'u_final_scoring' or create a manual record and set the value of the field to 1 or 2 and test it.
Below is for reference where I simulated your use-case in my PDI,
I hope you appreciate the efforts to mimic this scenario in my PDI and provide you with this information by marking the posts helpful and accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Glad to know it is working now. I can see there is a known issue in applying field styles for read-only fields and problem record is PRB663205. Not sure if enhancement request for this feature is made available,
I have seem some community solutions but not sure if it would work and would recommend to uncheck 'Read Only' from dictionary and if you want to enforce it, do so from UI Policy.
See below for sample UI policy, change filter conditions to suit your requirement
'u_final_scoring' field is read-only and styles would work with this option,
I hope you appreciate the efforts in providing this solution and would mark the post helpful and accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Go to table -> select field -> Configure Styles. Create desired background for the table and field using below syntax
background-color: <color or HEX Code>;
//sample code
background-color: tomato;
If this helped to answer your query, please accept the solution and close the thread.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi Bhuvan,
I already tried your solution but apparently mine is still gray in color. Why tho?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hi @ChuanYanF ,
can you clear cache and check?
In Navigator, type cache.do and click "clear cache" link and log out and log in again then verify your field
Clear your browser's cache as well, as cached styles can prevent new styles from being displayed.
Also, To apply field styles on both lists and forms, leave the "Value" field blank in the Configure Styles record. If you need conditional styling based on a field's value on a form, a Client Script is required.
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks, GP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Is this out of box field or custom field ?
Can you share field name and screenshot of any sample record in the table. I am not able to locate field 'Outsourcing assessment: Outcome' in table 'sn_vdr_risk_asmt_vdr_tiering_assessment'
Thanks,
Bhuvan