Record Producer displaying differently than Catalog Item in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 11:48 AM
Hello,
I have a unique problem and am looking for some guidance/help if possible!
Currently, in the service portal we have designed it so that the title of the catalog item is a font color white and the background for the header area that displays the title is dark blue. However, I am working to create some Record producers and that functionality only seems to work (title font white & background dark blue) when the short description field has text in it. If it doesn't have any text, then the background of the title header displays as white.
A colleague added some custom code in order to make the catalog item header background display as dark blue. So essentially:
- When I have text in the "Short Description" field of the Record producer record, then that code is inserted and the header background is dark blue.
-When no text is in the "Short Description" field of the Record producer record, that code is missing and the header background is white.
I'm not familiar with service portal development, so any help/guidance would be appreciated as to why the code/functionality works and is dependent upon text being input in the "Short Description" of the Record Producer record.
Thanks!
Justin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 11:54 AM
Hello,
You've made the background for the font to be blue, when there is no font...there's nothing to give the background to.
If you're wanting a blue background with no font (because it doesn't have a short description - which all catalog items "should") then you'd need to edit the code to make the background blue no matter what over 'x' amount of pixel width, etc.
Please speak with your peers about that as that isn't necessarily a ServiceNow specific issue, but more of an HTML/CSS issue.
This same outcome would happen in web development anywhere and not necessarily due to ServiceNow.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2022 05:31 AM
Hi Allen,
Thank you for taking the time to offer your advice! Very much appreciated. We ended up changing some of the CSS in the Service Portal script and that was the trick.
Thanks again!
Regards,
Justin