<?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 Wanted to hide Attachment field for the default view in custom table. in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348629#M4206</link>
    <description>&lt;P&gt;I'm trying to hide the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;attachment field&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from the form&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;only in the default view&lt;/STRONG&gt;. It should remain visible in all other views.&lt;/P&gt;&lt;P&gt;To achieve this, I wrote the following&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;onLoad client script&lt;/STRONG&gt;, but the field is still not hiding. I'm sharing the code below for your reference:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Praju_123_0-1754917177985.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/462124iF0F9A7D700EAA0DE/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Praju_123_0-1754917177985.png" alt="Praju_123_0-1754917177985.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; viewName = g_form.getViewName();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (viewName === &lt;/SPAN&gt;&lt;SPAN&gt;'default'&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Disable the paperclip icon for adding new attachments&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_form.disableAttachments();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Hide the attachment section (classic UI)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; attachSection = document.getElementById(&lt;/SPAN&gt;&lt;SPAN&gt;'header_attachment'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (attachSection) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attachSection.style.display = &lt;/SPAN&gt;&lt;SPAN&gt;'none'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Hide the attachment separator line if present&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; attachLine = document.getElementById(&lt;/SPAN&gt;&lt;SPAN&gt;'header_attachment_line'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (attachLine) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attachLine.style.display = &lt;/SPAN&gt;&lt;SPAN&gt;'none'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;Despite this, the attachment field is still visible. Could you please help us identify what might be missing or suggest an alternative approach?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 11 Aug 2025 13:01:36 GMT</pubDate>
    <dc:creator>Praju_123</dc:creator>
    <dc:date>2025-08-11T13:01:36Z</dc:date>
    <item>
      <title>Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348629#M4206</link>
      <description>&lt;P&gt;I'm trying to hide the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;attachment field&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from the form&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;only in the default view&lt;/STRONG&gt;. It should remain visible in all other views.&lt;/P&gt;&lt;P&gt;To achieve this, I wrote the following&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;onLoad client script&lt;/STRONG&gt;, but the field is still not hiding. I'm sharing the code below for your reference:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Praju_123_0-1754917177985.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/462124iF0F9A7D700EAA0DE/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Praju_123_0-1754917177985.png" alt="Praju_123_0-1754917177985.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; viewName = g_form.getViewName();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (viewName === &lt;/SPAN&gt;&lt;SPAN&gt;'default'&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Disable the paperclip icon for adding new attachments&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_form.disableAttachments();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Hide the attachment section (classic UI)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; attachSection = document.getElementById(&lt;/SPAN&gt;&lt;SPAN&gt;'header_attachment'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (attachSection) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attachSection.style.display = &lt;/SPAN&gt;&lt;SPAN&gt;'none'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Hide the attachment separator line if present&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; attachLine = document.getElementById(&lt;/SPAN&gt;&lt;SPAN&gt;'header_attachment_line'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (attachLine) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attachLine.style.display = &lt;/SPAN&gt;&lt;SPAN&gt;'none'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;Despite this, the attachment field is still visible. Could you please help us identify what might be missing or suggest an alternative approach?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Aug 2025 13:01:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348629#M4206</guid>
      <dc:creator>Praju_123</dc:creator>
      <dc:date>2025-08-11T13:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348639#M4208</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried to give view name after removing global check box on right hand side in client script:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NikhilBajaj9_0-1754918429070.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/462126i6704F75A621C32A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NikhilBajaj9_0-1754918429070.png" alt="NikhilBajaj9_0-1754918429070.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be an alternative approach. Try once and share feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikhil Bajaj&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 13:18:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348639#M4208</guid>
      <dc:creator>Nikhil Bajaj9</dc:creator>
      <dc:date>2025-08-11T13:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348668#M4209</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do this and it should work fine&lt;/P&gt;
&lt;P&gt;1) Ensure "&lt;STRONG&gt;Isolate Script&lt;/STRONG&gt;" = false for your onLoad client script so that DOM is allowed&lt;/P&gt;
&lt;P&gt;2) ensure you check Global checkbox so that it runs on all view, anyhow your script is checking the view name&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) this field if not on form can be marked as False from list view&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurBawiskar_0-1754919099668.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/462145i1BF845949DB4E621/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_0-1754919099668.png" alt="AnkurBawiskar_0-1754919099668.png" /&gt;&lt;/span&gt;&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="AnkurBawiskar_1-1754919226007.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/462150i64B5F2BB98148096/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_1-1754919226007.png" alt="AnkurBawiskar_1-1754919226007.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Note: DOM manipulation is not recommended&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 13:33:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348668#M4209</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-08-11T13:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348744#M4212</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have already set the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Global&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;checkbox to&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Isolate Script&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 13:59:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348744#M4212</guid>
      <dc:creator>Praju_123</dc:creator>
      <dc:date>2025-08-11T13:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348751#M4213</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;I was working on this question — by the way, great solution, &lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I&amp;nbsp; learned about &lt;STRONG&gt;Isolate Script.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;One more thing I discovered while solving this question is that we &lt;STRONG&gt;cannot define "default"&lt;/STRONG&gt; in the &lt;STRONG&gt;View Name&lt;/STRONG&gt; field of a client script.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It should be working&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp; , I tried it on PDI and the solution&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;provided is working.&lt;/FONT&gt;&lt;BR /&gt;cc:&amp;nbsp;&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/359229"&gt;@Nikhil Bajaj9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:15:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348751#M4213</guid>
      <dc:creator>Shashank_Jain</dc:creator>
      <dc:date>2025-08-11T14:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348754#M4214</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you add alert and see what came in view name?&lt;/P&gt;
&lt;P&gt;try this and share feedback&lt;/P&gt;
&lt;DIV style="color: #000000; background-color: #fffffe; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 12px; line-height: 16px; white-space: pre;"&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;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; viewName = g_form.getViewName();&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; alert(viewName);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (viewName === &lt;/SPAN&gt;&lt;SPAN&gt;'default'&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert('inside if');&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Disable the paperclip icon for adding new attachments&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_form.disableAttachments();&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Hide the attachment section (classic UI)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; attachSection = document.getElementById(&lt;/SPAN&gt;&lt;SPAN&gt;'header_attachment'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (attachSection) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attachSection.style.display = &lt;/SPAN&gt;&lt;SPAN&gt;'none'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Hide the attachment separator line if present&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; attachLine = document.getElementById(&lt;/SPAN&gt;&lt;SPAN&gt;'header_attachment_line'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (attachLine) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attachLine.style.display = &lt;/SPAN&gt;&lt;SPAN&gt;'none'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:11:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348754#M4214</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-08-11T14:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348758#M4215</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/603242"&gt;@Shashank_Jain&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;thank you for replying&lt;BR /&gt;&lt;SPAN&gt;When I called the view name and placed an alert below it, it was correctly showing the view name as "default".&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Praju_123_0-1754921630136.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/462176i7D3F274191BD757C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Praju_123_0-1754921630136.png" alt="Praju_123_0-1754921630136.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:14:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348758#M4215</guid>
      <dc:creator>Praju_123</dc:creator>
      <dc:date>2025-08-11T14:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348763#M4216</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;still, it's not working.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:17:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348763#M4216</guid>
      <dc:creator>Praju_123</dc:creator>
      <dc:date>2025-08-11T14:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348770#M4217</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;It works only when the attachment field is empty.&lt;/SPAN&gt;&lt;BR /&gt;However, in our use case, the record is created via a&amp;nbsp;Record Producer, and an attachment is uploaded during that process.&lt;BR /&gt;We want the&amp;nbsp;attachment field to be hidden in the default view, but&amp;nbsp;visible in the Workspace view.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:23:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348770#M4217</guid>
      <dc:creator>Praju_123</dc:creator>
      <dc:date>2025-08-11T14:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348775#M4218</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I tried it on my PDI, and it's working as expected.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;You can run the Script Tracer to check if any other script is interfering, or share more details about your instance — for example, are you using domain separation or any additional custom functionality?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;You can also try it on your own PDI; it should work there as well.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:28:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348775#M4218</guid>
      <dc:creator>Shashank_Jain</dc:creator>
      <dc:date>2025-08-11T14:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348776#M4219</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/603242"&gt;@Shashank_Jain&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;It works only when the attachment field is empty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, in our use case, the record is created via a&amp;nbsp;Record Producer, and an attachment is uploaded during that process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We want the&amp;nbsp;attachment field to be hidden in the default view, but&amp;nbsp;visible in the Workspace view.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:30:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348776#M4219</guid>
      <dc:creator>Praju_123</dc:creator>
      <dc:date>2025-08-11T14:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348792#M4220</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry but you didn't mention what came in alert?&lt;/P&gt;
&lt;P&gt;what came in alert?&lt;/P&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:44:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348792#M4220</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-08-11T14:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348794#M4221</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;, I submitted a record producer on the Incident table and attached a file during submission. However, when I returned to the form view of the table, the attachment clip was not visible for default view. Client script was working fine.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:45:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348794#M4221</guid>
      <dc:creator>Shashank_Jain</dc:creator>
      <dc:date>2025-08-11T14:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348800#M4222</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;"default" coming in alert ,&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;mentioned in below replies.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 14:49:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348800#M4222</guid>
      <dc:creator>Shashank_Jain</dc:creator>
      <dc:date>2025-08-11T14:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Wanted to hide Attachment field for the default view in custom table.</title>
      <link>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348914#M4225</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/588162"&gt;@Praju_123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what do you mean by attachment field?&lt;/P&gt;
&lt;P&gt;you are trying to remove the top header attachment icon and the header row right?&lt;/P&gt;
&lt;P&gt;how is file attached to record producer?&lt;/P&gt;
&lt;P&gt;Via paper-clip icon or some attachment variable?&lt;/P&gt;
&lt;P&gt;share screenshots&lt;/P&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 17:14:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/wanted-to-hide-attachment-field-for-the-default-view-in-custom/m-p/3348914#M4225</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-08-11T17:14:41Z</dc:date>
    </item>
  </channel>
</rss>

