<?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 Make Change Request close notes field mandatory with script populated text present? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671544#M1035705</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a request which is related to the Change Request form, where on form closure, if the close code is unsuccessful then the close notes will auto populate the text - "Explain why this change is not successful?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to populate the text via UI policy script -&lt;/P&gt;&lt;P&gt;------------------&lt;BR /&gt;function onCondition() {&lt;BR /&gt;&lt;BR /&gt;g_form.setValue('close_notes', 'Explain why this change is not successful?;&lt;BR /&gt;}&lt;BR /&gt;------------------&lt;/P&gt;&lt;P&gt;But the issue is the above mentioned text is considered as fulfilling the close notes "mandatory" field condition, and users can just save the form without adding any additional text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So is there a way to make the close notes field mandatory, even with the&amp;nbsp;text - "Explain why this change is not successful?" present and populated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HappyJ_1-1694688406532.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288728i2C8BD5BC6931B52C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HappyJ_1-1694688406532.png" alt="HappyJ_1-1694688406532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; I want the close notes asterix symbol to be in red even with the text populated in the field&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HappyJ_0-1694688391106.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288725i695E01732D5B19E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HappyJ_0-1694688391106.png" alt="HappyJ_0-1694688391106.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 10:47:57 GMT</pubDate>
    <dc:creator>Happy S</dc:creator>
    <dc:date>2023-09-14T10:47:57Z</dc:date>
    <item>
      <title>Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671544#M1035705</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a request which is related to the Change Request form, where on form closure, if the close code is unsuccessful then the close notes will auto populate the text - "Explain why this change is not successful?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to populate the text via UI policy script -&lt;/P&gt;&lt;P&gt;------------------&lt;BR /&gt;function onCondition() {&lt;BR /&gt;&lt;BR /&gt;g_form.setValue('close_notes', 'Explain why this change is not successful?;&lt;BR /&gt;}&lt;BR /&gt;------------------&lt;/P&gt;&lt;P&gt;But the issue is the above mentioned text is considered as fulfilling the close notes "mandatory" field condition, and users can just save the form without adding any additional text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So is there a way to make the close notes field mandatory, even with the&amp;nbsp;text - "Explain why this change is not successful?" present and populated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HappyJ_1-1694688406532.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288728i2C8BD5BC6931B52C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HappyJ_1-1694688406532.png" alt="HappyJ_1-1694688406532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; I want the close notes asterix symbol to be in red even with the text populated in the field&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HappyJ_0-1694688391106.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288725i695E01732D5B19E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HappyJ_0-1694688391106.png" alt="HappyJ_0-1694688391106.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 10:47:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671544#M1035705</guid>
      <dc:creator>Happy S</dc:creator>
      <dc:date>2023-09-14T10:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671565#M1035716</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/325204"&gt;@Happy S&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;First things first. I would not recommend doing this, but instead use annotations for it.&lt;/P&gt;&lt;P&gt;That being said, if you really need to do this, create a onload client script (or in the UI policy you tried already if you want it only on a certain condition):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function onLoad() {
  var notes= g_form.getControl('close_notes');
notes.placeholder = "Explain why this change is not successful?.";
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 10:57:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671565#M1035716</guid>
      <dc:creator>Peter Bodelier</dc:creator>
      <dc:date>2023-09-14T10:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671571#M1035721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/325204"&gt;@Happy S&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of putting text in close notes you can set "Field Message"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;function onCondition() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;g_form.showFieldMsg('close_notes', 'Explain why this change is not successful?');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VishalBirajdar7_0-1694689822499.png" style="width: 708px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288732i55B5A40204539D32/image-dimensions/708x174?v=v2" width="708" height="174" role="button" title="VishalBirajdar7_0-1694689822499.png" alt="VishalBirajdar7_0-1694689822499.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 11:10:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671571#M1035721</guid>
      <dc:creator>Vishal Birajdar</dc:creator>
      <dc:date>2023-09-14T11:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671685#M1035768</link>
      <description>&lt;P&gt;Somehow if I toggle between the Close Codes - successful and unsuccessful the message keeps displaying on top of each other..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway to have it display only once?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HappyJ_0-1694693694822.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288747iAB1DC936EA8CA176/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HappyJ_0-1694693694822.png" alt="HappyJ_0-1694693694822.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:16:07 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671685#M1035768</guid>
      <dc:creator>Happy S</dc:creator>
      <dc:date>2023-09-14T12:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671691#M1035770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/325204"&gt;@Happy S&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add this in front of the showfieldmsg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;g_form.hideFieldMsg('close_notes',true);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:19:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671691#M1035770</guid>
      <dc:creator>Peter Bodelier</dc:creator>
      <dc:date>2023-09-14T12:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671704#M1035777</link>
      <description>&lt;P&gt;Too bad it doesn't seems to work as the field message is now no longer visible..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HappyJ_0-1694694304344.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288756i7F78666773C2A67B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HappyJ_0-1694694304344.png" alt="HappyJ_0-1694694304344.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:25:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671704#M1035777</guid>
      <dc:creator>Happy S</dc:creator>
      <dc:date>2023-09-14T12:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671715#M1035781</link>
      <description>&lt;P&gt;What is the "When to apply" in UI policy ?&lt;/P&gt;&lt;P&gt;If it is like :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;close code is unsuccessful&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VishalBirajdar7_1-1694694423187.png" style="width: 600px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288760i2381D6290C1E818D/image-dimensions/600x219?v=v2" width="600" height="219" role="button" title="VishalBirajdar7_1-1694694423187.png" alt="VishalBirajdar7_1-1694694423187.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Then in execute if false script part write :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;g_form.hideFieldMsg('close_notes',true);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VishalBirajdar7_0-1694694353613.png" style="width: 612px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288758i3614C8D46C2DD4C8/image-dimensions/612x264?v=v2" width="612" height="264" role="button" title="VishalBirajdar7_0-1694694353613.png" alt="VishalBirajdar7_0-1694694353613.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===========================================================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case you are using onChange client script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VishalBirajdar7_0-1694694855822.png" style="width: 694px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/288765i38B3B5538070AAE8/image-dimensions/694x281?v=v2" width="694" height="281" role="button" title="VishalBirajdar7_0-1694694855822.png" alt="VishalBirajdar7_0-1694694855822.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:34:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671715#M1035781</guid>
      <dc:creator>Vishal Birajdar</dc:creator>
      <dc:date>2023-09-14T12:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Make Change Request close notes field mandatory with script populated text present?</title>
      <link>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671716#M1035782</link>
      <description>&lt;P&gt;That's strange, can you share your script?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:27:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/make-change-request-close-notes-field-mandatory-with-script/m-p/2671716#M1035782</guid>
      <dc:creator>Peter Bodelier</dc:creator>
      <dc:date>2023-09-14T12:27:33Z</dc:date>
    </item>
  </channel>
</rss>

