Colour a field if it has any value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 06:23 AM
I'm trying to colour a field when it has any value in it. I've tried using Styles, UI Policy, Client Script but I can't get it to work. Here's what I tried in client scripts:
Any ideas how I can make this work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 06:26 AM
Hi @Eduard B1
You can achieve this by defining a field style on the "Color" field. Here is how you do :
1. Right click on the color field
2. go to Configure Styles.
3. Click on "New"
4. Select table where the field belongs.
5. Select the "Color" field in the Field name drop dow box.
6. In the Style field write this line: background-color:Red;
7. Submit.
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 06:28 AM
Yeah, I know how to add a colour from Styles but I don't know how to make that colour appear just when the field has a value in it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 06:51 AM
I have tried in PDI refer below screen shot.
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 07:00 AM
I tried it like this but still doesn't work. I'm also working in a PDI for this. My field name is caller_id. I used javascript: current.caller_id !=""