- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 05:04 AM
I have a quantity field in a custom table. I create a field style with the table name, field name, no value, and the style of 'text-align: left;'.
In the form, the field aligns left. In the list, it aligns right. I expected both to align left.
If I add the value 'javascript:current.quantity > 0', then the list aligns left, and the form does not. What I would expect from the documentation.
Any guesses as to why the list doesn't align without a 'value' statement?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 07:57 AM
this is my analysis
1) by default all list field values are left aligned so you may not differentiate whether the field style is working or not
2) this can be verified by adding text-align:right to the style
I believe there is some bug. I kept the value field empty but it aligned on right only for form but not for list
if we add this in the value then the text-align:right works on list only
So I consider value is required for making it work on list
javascript:1==1
List
Form - not applied
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 05:09 AM
Hi,
please share the screenshot of field style
As per docs -> Field styles are not displayed in list view when the Value field is left empty
Field styles are not displayed in list view when the Value field is left empty
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 05:25 AM
Interesting. According to the Paris documentation (https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/navigation-and-ui/task/t_DefineFieldStyles.html), it applies to both:
You are referencing a KB knowledge article, which implies it was last seen in Istanbul.
Here is my configuration:
So you believe it's still broken in Paris?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 05:41 AM
Hi,
if you keep value as empty it would apply only on form and not on list.
in your case I believe your field aligning on left makes on difference on the list as it would be shown based on the position you have configured it using list layout
So I believe it is working as expected.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 05:52 AM
Ankur,
So you think the doc is wrong? It says an empty value should cause the style to apply to both list and form.
As far as I know, I haven't changed the individual field style using the list layout (can you?).
So based on the documentation, I don't think it's working as expected.