<?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 Preferences Section on Project form is Visible after creating UI policy in SPM forum</title>
    <link>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/2872480#M42441</link>
    <description>&lt;P&gt;On the project form I have Created UI policy with following script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;g_form.setDisplaySection('score');&lt;/P&gt;&lt;P&gt;g_form.setDisplaySection('business_case');&lt;/P&gt;&lt;P&gt;g_form.setDisplaySection('preferences');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With help of this UI policy Score and Business case section got hidden but not the Preferences section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2024 09:35:15 GMT</pubDate>
    <dc:creator>saurabha_upare</dc:creator>
    <dc:date>2024-03-21T09:35:15Z</dc:date>
    <item>
      <title>Preferences Section on Project form is Visible after creating UI policy</title>
      <link>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/2872480#M42441</link>
      <description>&lt;P&gt;On the project form I have Created UI policy with following script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;g_form.setDisplaySection('score');&lt;/P&gt;&lt;P&gt;g_form.setDisplaySection('business_case');&lt;/P&gt;&lt;P&gt;g_form.setDisplaySection('preferences');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With help of this UI policy Score and Business case section got hidden but not the Preferences section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 09:35:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/2872480#M42441</guid>
      <dc:creator>saurabha_upare</dc:creator>
      <dc:date>2024-03-21T09:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Preferences Section on Project form is Visible after creating UI policy</title>
      <link>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/2872484#M42442</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/450323"&gt;@saurabha_upare&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try with complete syntax mentioned below.&lt;/P&gt;&lt;PRE&gt;g_form.setSectionDisplay('&amp;lt;section_name&amp;gt;', false);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Hope this helps you. Please mark it as helpful and accept the answer it it works for you.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 09:38:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/2872484#M42442</guid>
      <dc:creator>Simran Gadodiya</dc:creator>
      <dc:date>2024-03-21T09:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Preferences Section on Project form is Visible after creating UI policy</title>
      <link>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/3273493#M47148</link>
      <description>&lt;P&gt;Hi I have the below script in place and yet it does not work in my client as well as pdi.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; onLoad() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Type appropriate comment here, and begin script below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (g_user.hasRole(&lt;/SPAN&gt;&lt;SPAN&gt;'admin'&lt;/SPAN&gt;&lt;SPAN&gt;) || g_user.hasRole(&lt;/SPAN&gt;&lt;SPAN&gt;'it_pps_admin'&lt;/SPAN&gt;&lt;SPAN&gt;)) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// User has required role, do nothing&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Hide the Preferences section for all others&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;alert(g_form.getSectionNames());&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;g_form.setSectionDisplay(&lt;/SPAN&gt;&lt;SPAN&gt;'preferences'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;g_form.setSectionDisplay(&lt;/SPAN&gt;&lt;SPAN&gt;'dates'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Dates tab is getting hidden. In my alert, the value returned for preferences tab is same as in the code. I have tried the same single line of sectiondisplay in ui policy scripts and it still doesnt apply.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 May 2025 11:29:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/3273493#M47148</guid>
      <dc:creator>harinivenkatesh</dc:creator>
      <dc:date>2025-05-26T11:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Preferences Section on Project form is Visible after creating UI policy</title>
      <link>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/3273494#M47149</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/450323"&gt;@saurabha_upare&lt;/a&gt;&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/24107"&gt;@Simran Gadodiya&lt;/a&gt;&amp;nbsp; - Any inputs?&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 11:30:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/preferences-section-on-project-form-is-visible-after-creating-ui/m-p/3273494#M47149</guid>
      <dc:creator>harinivenkatesh</dc:creator>
      <dc:date>2025-05-26T11:30:10Z</dc:date>
    </item>
  </channel>
</rss>

