Video Screencast Help

jQuery in ServiceDesk portal pages?

Created: 16 Jan 2013 • Updated: 17 Jan 2013 | 2 comments
This issue has been solved. See solution.

I can only assume the jQuery library is unsupported in ServiceDesk verX.x portal pages due to the "0" number of posts a "jQuery" search returns in the forums.  Is this true? Anyone out there get it to work?  

I'm specifically trying to style/color certain columns and values in reports.  Made more complicated due to my users only wanting to color code certain values in rows/columns (like "High" priority to red).  Utilizing javascript would make the most sense to delegate the processing of column values and styles away from the server, and onto the client.  jQuery just makes it that much more simple, hence the question.

Comments 2 CommentsJump to latest comment

Greg2105's picture
Ok, well. I guess "unsupported" was a restrictive word. Symantec doesn't support things that are not Symantec.
I did figure out how to make it work, albeit, not pretty.
  1. Add a web part to the page: UI -> HTMLDisplayWebPart
  2. Edit the webpart, click the HTML tab, and entered the following:
  • <script src="http://venezia:81/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script type="text/javascript">
       ​Done right, you should get a "1" alerted when the page loads (1 should be the return result from a jQuery "body" element count).
Bad news?
  • Every time I come back to modify the webpart, and click the HTML tab, it is empty. Then when you click Apply button, you realize the code was really not there when you updated it.

Guess you can't have everything in life. For now, I just copy/paste my code repeatedly when making changes.

Greg2105's picture

Always an easier way, right?

For those looking to color code values (conditonal formatting) in your reports:

In the report builder's Data tab, hover your mouse over the column you want to format and cick the Edit pencil.

Add a Add Column Formatting to the field, selecting the color and value you require.