question

RJF-4684 avatar image
0 Votes"
RJF-4684 asked EmilyDu-MSFT edited

Field Color

I have a list form as shown (that I created in InfoPath). I am currently using a Rule to change the color depending on field content. Because the color does not remain, i assume this is lost when the field or form are not the "focus". Is there a way to conditionally format this field based on content and have the color remain?

78900-field-color.jpg



Thanks

office-sharepoint-server-customization
field-color.jpg (95.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RJF-4684

I'm checking how the things are going on about this issue. Whether the answer helps you?

You can accept the answer if it helps.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




0 Votes 0 ·

1 Answer

EmilyDu-MSFT avatar image
0 Votes"
EmilyDu-MSFT answered EmilyDu-MSFT edited

@RJF-4684

Based on your description, I understand that you want to set SharePoint list column background color according to column contents.

Here’re steps:

1.Edit page -> Add a content editor web part.
2.Press F12, find column ID.
79194-1.png
3.Edit page -> Edit source -> Add codes which are put in the attachment-code.txt.
Note: You should replace "ms-vb-lastCell.ms-cellstyle.ms-vb2.ms-vb-lastCell" with ID found in previous step.
79135-2.png
4.Result
79127-3.png


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



1.png (24.5 KiB)
2.png (26.0 KiB)
3.png (3.6 KiB)
code.txt (828 B)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.