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

@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

gregm3
Giga Contributor

Thanks.  I would disagree on your statement that all fields align left in a list.  For my Paris dev box, integer fields align right.  That's what has taken me down this path.

I do agree there is a bug.  I like your javascript solution.

I marked as correct for all your help!