<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Adding a flag to a CI in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632248#M204027</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have identified a number of CIs that are to be listed as "High Impact" CIs via a true/false box that we have added to all classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if there is a way to make these CIs stand out when entered into a 'Primary CI' or 'Affected CI' field on changes and incidents respectively, if this field is ticked. Similar to the warning indicator that comes up when a CI is selected that is currently affected by another task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 11 Feb 2015 09:26:04 GMT</pubDate>
    <dc:creator>olivershields</dc:creator>
    <dc:date>2015-02-11T09:26:04Z</dc:date>
    <item>
      <title>Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632248#M204027</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have identified a number of CIs that are to be listed as "High Impact" CIs via a true/false box that we have added to all classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if there is a way to make these CIs stand out when entered into a 'Primary CI' or 'Affected CI' field on changes and incidents respectively, if this field is ticked. Similar to the warning indicator that comes up when a CI is selected that is currently affected by another task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2015 09:26:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632248#M204027</guid>
      <dc:creator>olivershields</dc:creator>
      <dc:date>2015-02-11T09:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632249#M204028</link>
      <description>&lt;P&gt;You can certainly do this.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;It is easy to do for the list view, and simply uses a style. With your field created, from any incident, right-click the header and select &lt;STRONG&gt;Personalize &amp;gt; All&lt;/STRONG&gt;. Then go to the &lt;STRONG&gt;Styles&lt;/STRONG&gt; tab and create a new style on the Configuration Item field. Set the value to &lt;STRONG&gt;javascript:current.cmdb_ci.u_high_impact == true &lt;/STRONG&gt;(adjust this to reflect your actual field name). Then define the style you want to apply. Perhaps a background color change or something else.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;It is a little trickier to make the CI stand out on the form. For that you will need a Client Script. There is already something similar that you can use as an example and modify: the &lt;STRONG&gt;Highlight VIP Caller&lt;/STRONG&gt; Client Script does something like what you want, but for the Caller field.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Here is a script you can drop in. You need to adjust the field name to match your actual High Impact field (indicated in bold below).&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;function onChange(control, oldValue, newValue, isLoading) {&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; var ciField = $('sys_display.incident.cmdb_ci');&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; if (!ciField)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; return;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; if (!newValue) {&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; ciField.setStyle({color: ""});&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; return;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; g_form.getReference('cmdb_ci', highImpactCICallback);&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;function highImpactCICallback(ci) {&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; var ciField = $('sys_display.incident.cmdb_ci');&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; if (!ciField)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; return;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; //check for High Impact status&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; if (ci.&lt;STRONG&gt;u_high_impact&lt;/STRONG&gt; == 'true') {&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; ciField.setStyle({color: "red"});&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; } else {&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; ciField.setStyle({color: ""});&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 14:56:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632249#M204028</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2015-02-11T14:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632250#M204029</link>
      <description>&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks for the help but i cant seem to get it to work.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I have used the script you provided for the value and amended it to the field name (same as yours only with an _ci after it). I have even just used 'background-color:tomato' as the style to try and get it working but when i put a CI in the box that has the High Impact CI field ticked it does nothing.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Is there something else i need to check?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 15:54:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632250#M204029</guid>
      <dc:creator>olivershields</dc:creator>
      <dc:date>2015-02-11T15:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632251#M204030</link>
      <description>&lt;P&gt;Can you post a screen shot of the Client Script record you created? That might be easier than trying to ask through all the possibilities. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 15:57:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632251#M204030</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2015-02-11T15:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632252#M204031</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SN1.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/35209iD772EF3770FD34B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="SN1.png" alt="SN1.png" /&gt;&lt;/span&gt;This is the customer field thats been created on the CI table&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SN2.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/35207iBCE3873648CF1F0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="SN2.png" alt="SN2.png" /&gt;&lt;/span&gt;This is the style that i have setup. Hoping that this turns the field red (or tomato?) when a CI is put into it that has the above field ticked.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Dont quite know what you mean by Client Script (forgive my scripting ignorance) but hope this covers it.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 16:07:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632252#M204031</guid>
      <dc:creator>olivershields</dc:creator>
      <dc:date>2015-02-11T16:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632253#M204032</link>
      <description>&lt;P&gt;Oliver,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The Style only applies to the list view. You will not see it affect the field on the form. Check the list view to see that your CI field now has the background.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;For the form, you need to create a new Client Script. From an Incident record, right-click the form header and select &lt;STRONG&gt;Personalize &amp;gt; Client Scripts&lt;/STRONG&gt;. Then create a &lt;STRONG&gt;New&lt;/STRONG&gt; one that looks like this. You can copy the script from above, but change the bold part to &lt;STRONG&gt;u_high_impact_ci&lt;/STRONG&gt;. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-02-11 at 10.15.09 AM.JPG"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/35211i283D8A781156A150/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-02-11 at 10.15.09 AM.JPG" alt="Screen Shot 2015-02-11 at 10.15.09 AM.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;This makes the text of the CI red on the form (pictured as follows). You can change the style on line 20 in the script above as you desire.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-02-11 at 10.18.52 AM.JPG"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/35214i144B6AFD7B56A2A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-02-11 at 10.18.52 AM.JPG" alt="Screen Shot 2015-02-11 at 10.18.52 AM.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 16:19:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632253#M204032</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2015-02-11T16:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632254#M204033</link>
      <description>&lt;P&gt;Got it working now Ben,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks for all your help &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://www.servicenow.com/6.0.3.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Feb 2015 08:43:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632254#M204033</guid>
      <dc:creator>olivershields</dc:creator>
      <dc:date>2015-02-12T08:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632255#M204034</link>
      <description>&lt;P&gt;Another question, same topic.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I have it working on the closure information tab on the incident and im sure i will be able to get it working the same on Primary CIs on change records.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I would like a similar change of colour to take affect on the "Affected CIs" related list on both incidents and changes so that any high impact CIs can be picked out of a large amount that might be linked but as its a related list and not actually part of the form im struggling on how this can be done.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Feb 2015 10:04:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632255#M204034</guid>
      <dc:creator>olivershields</dc:creator>
      <dc:date>2015-02-12T10:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632256#M204035</link>
      <description>&lt;P&gt;This is a list, so you can use the Styles, similar to above, but there is a little trick to this, because there is a many-to-many relationship between CIs and Tasks (CIs can be associated to many different Tasks and vice versa). This means there is an intermediate table that makes the connection. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;From the Affected CIs related list, right-click the header of any column and select &lt;STRONG&gt;Personalize &amp;gt; All&lt;/STRONG&gt;. Go to the &lt;STRONG&gt;Styles&lt;/STRONG&gt; tab and create a &lt;STRONG&gt;New&lt;/STRONG&gt; one.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Then apply it to the Configuration Item field. The difference here is going to be the Value. The CIs Affected table refers to the CI in the field ci_item (yes, yes... I know... Configuration Item item?? &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://www.servicenow.com/6.0.3.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;), so your Style would look something like this:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-02-12 at 8.25.22 AM.JPG"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/35219iA3B1368B9412A8E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-02-12 at 8.25.22 AM.JPG" alt="Screen Shot 2015-02-12 at 8.25.22 AM.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The value being &lt;STRONG&gt;javascript:current.ci_item.u_high_impact_ci == true&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Feb 2015 14:27:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632256#M204035</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2015-02-12T14:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632257#M204036</link>
      <description>&lt;P&gt;I got as far as adding it in as a style using the previous method but changing to table to ci_item seems to have done the trick.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks for all the help Ben&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Feb 2015 14:39:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632257#M204036</guid>
      <dc:creator>olivershields</dc:creator>
      <dc:date>2015-02-12T14:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to a CI</title>
      <link>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632258#M204037</link>
      <description>&lt;P&gt;You're welcome. Happy to help.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Feb 2015 15:17:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/adding-a-flag-to-a-ci/m-p/632258#M204037</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2015-02-12T15:17:21Z</dc:date>
    </item>
  </channel>
</rss>

