<?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 Hide choice from List field type in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409713#M66639</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I have list type of field which is not referring to any table but have certain choice. Refer below screenshot of dictionary of the field.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/145572i9EA17EC6C3EBA12C/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The requirement is to hide certain choice value dynamically based on some condition, like checkbox. If the checkbox field is true hide 3 choices out of 4 in the form.&lt;/P&gt;
&lt;P&gt;I do not want to use any DOM manipulation. I also tried g_form.removeOption but it did not work on list type of field.&lt;/P&gt;
&lt;P&gt;Any leads would be appreciated.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Deepankar Mathur&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 18:12:56 GMT</pubDate>
    <dc:creator>dmathur09</dc:creator>
    <dc:date>2022-03-30T18:12:56Z</dc:date>
    <item>
      <title>Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409713#M66639</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I have list type of field which is not referring to any table but have certain choice. Refer below screenshot of dictionary of the field.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/145572i9EA17EC6C3EBA12C/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The requirement is to hide certain choice value dynamically based on some condition, like checkbox. If the checkbox field is true hide 3 choices out of 4 in the form.&lt;/P&gt;
&lt;P&gt;I do not want to use any DOM manipulation. I also tried g_form.removeOption but it did not work on list type of field.&lt;/P&gt;
&lt;P&gt;Any leads would be appreciated.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Deepankar Mathur&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 18:12:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409713#M66639</guid>
      <dc:creator>dmathur09</dc:creator>
      <dc:date>2022-03-30T18:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409714#M66640</link>
      <description>&lt;P&gt;Hi Deepankar,&lt;BR /&gt;&lt;BR /&gt;You can simply create a&lt;EM&gt;&lt;STRONG&gt; UI Policy&lt;/STRONG&gt;&lt;/EM&gt; and use the following condition:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If variable A = True then in the &lt;EM&gt;&lt;STRONG&gt;UI policy action&lt;/STRONG&gt;&lt;/EM&gt; select the &lt;STRONG&gt;&lt;EM&gt;choice name and make visible = false.&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;This should work.&lt;BR /&gt;Please mark this correct if answers your question.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 18:37:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409714#M66640</guid>
      <dc:creator>Talha3</dc:creator>
      <dc:date>2022-03-30T18:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409715#M66641</link>
      <description>&lt;P&gt;Hi Tahla,&lt;/P&gt;
&lt;P&gt;Thank you for your response. However in UI Policy, I am unable to dot-walk to the choice. Refer the screenshot below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/145566iCAE0734333B6835D/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Deepankar Mathur&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 19:07:07 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409715#M66641</guid>
      <dc:creator>dmathur09</dc:creator>
      <dc:date>2022-03-30T19:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409716#M66642</link>
      <description>&lt;P&gt;I know you don't want to but I'm reasonably sure you are going to have to use DOM manipulation to&amp;nbsp;add and remove values you do not want people picking because its a list.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 20:30:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409716#M66642</guid>
      <dc:creator>DrewW</dc:creator>
      <dc:date>2022-03-30T20:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409717#M66643</link>
      <description>&lt;P&gt;Hey Drew,&lt;/P&gt;
&lt;P&gt;We do not want to any DOM manipulation as it is not a best practice nor&amp;nbsp; recommended by Servicenow&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Deepankar Mathur&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 13:59:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409717#M66643</guid>
      <dc:creator>dmathur09</dc:creator>
      <dc:date>2022-03-31T13:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409718#M66644</link>
      <description>&lt;P&gt;I understand that and if you are going to stick with that then you will have to use an onChange script to check the values and when they pick something they are not allowed to then put up a message and do not allow the record to be submitted/saved.&amp;nbsp; Its really your only option if you do not want to use DOM manipulation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 14:04:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409718#M66644</guid>
      <dc:creator>DrewW</dc:creator>
      <dc:date>2022-03-31T14:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409719#M66645</link>
      <description>&lt;P&gt;Hey Drew,&lt;/P&gt;
&lt;P&gt;I don't think that would be very user friendly for the customer.&lt;/P&gt;
&lt;P&gt;Is it also not possible do something using server side script? Like a display business rule?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Deepankar Mathur&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 19:47:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409719#M66645</guid>
      <dc:creator>dmathur09</dc:creator>
      <dc:date>2022-03-31T19:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hide choice from List field type</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409720#M66646</link>
      <description>&lt;P&gt;Per the docs,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Display rules are processed when a user requests a record form.&lt;/P&gt;
&lt;P&gt;https://docs.servicenow.com/bundle/paris-application-development/page/script/business-rules/concept/c_ScriptingWithDisplayBusinessRules.html&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So no you cannot use a display business rule.&amp;nbsp; You would have to try something with a query business rule but that is going to be really messy if its even possible.&lt;/P&gt;
&lt;P&gt;Have you thought about&amp;nbsp;making the field dependent on another field?&amp;nbsp; With a normal choice field it will filter the options automatically based on the dependent value.&amp;nbsp; I have not tried this with a list field but it may work.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 20:50:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-choice-from-list-field-type/m-p/1409720#M66646</guid>
      <dc:creator>DrewW</dc:creator>
      <dc:date>2022-03-31T20:50:38Z</dc:date>
    </item>
  </channel>
</rss>

