
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2020 09:50 PM
Hello Community,
Table: Company (core_company)
Q1: How to set background color using condition with a true/false checkbox
I can set the background color of the Name field using background: red;
There is a true/false checkbox (Test) on the form. In the Value field I out:
- javascript: current.u_test == 'true' (Does not work)
- javascript: current.u_test == "true" (Does not work)
- javascript: current.u_test == true (Does not work)
Q2: How to get the same field style into another table that references the core_company record?
Table: Incident (incident)
Can I use a dot-walk in the Value field, i.e. javascript: current.company.u_test == 'true'?
Thank you!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2020 10:10 PM
Hi Desmo,
Q1: javascript: current.u_test == true <--should work
Do you have another style record set up for this?
I tried the following and it works:
Q2: Yes, dot walking is allowed:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2020 10:10 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2020 11:45 AM
Hi Willem,
Thank you for taking the time to test.
Dot walking is working now. I see the color next to the name on list view. What's interesting is when I open the record and view it on a form, the name field does not have the background color. When I remove the condition in Field Styles value field, then the field is colored.
Desmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2020 10:21 PM
Hi
One option is if you have a Choice type of field with a true and a false choices. That field type does support a Field Style.
Thanks,
Berny