Field Style - works on form but no on list

gregm3
Giga Contributor

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?

1 ACCEPTED SOLUTION

@gregm 

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

find_real_file.png

Form - not applied

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

gregm3
Giga Contributor

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:

find_real_file.png

You are referencing a KB knowledge article, which implies it was last seen in Istanbul.

Here is my configuration:

find_real_file.png

So you believe it's still broken in Paris?

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

gregm3
Giga Contributor

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.