<h2>Unable to view newly created index on the UI</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Summary</h3><section><style type="text/css"><!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } </style> <div class="ns-kb-css-body-editor-container"> <p style="margin: 0cm 0cm 8pt; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">After a database index creation completes successfully, the newly created index may not appear in the<strong> ServiceNow UI</strong>. This occurs even though the index exists on the underlying database. The root cause is a stale platform cache that has not yet reflected the updated schema.</span></p> <h1 style="margin: 15pt 0cm 8pt; font-size: 18pt; font-family: Arial, sans-serif; color: rgb(26, 60, 52);"><span style="font-size: 12pt;">Symptoms</span></h1> <ul style="margin-top: 0cm; margin-bottom: 5pt; list-style-position: inside;"><li style="margin: 0cm 0cm 5pt 0px; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">Index creation completes without errors at the database level.</span></li><li style="margin: 0cm 0cm 5pt 0px; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">The index is not visible under the Related List, <strong>Indexes</strong> tab in the Table details</span><span style="font-size: 10.0pt;">.</span></li><li style="margin: 0cm 0cm 5pt 0px; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">Refreshing the browser or navigating away and back does not resolve the issue.</span></li><li style="margin: 0cm 0cm 5pt 0px; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">The index is confirmed to exist when checked directly on the database.</span></li></ul> <h1 style="margin: 15pt 0cm 8pt; font-size: 18pt; font-family: Arial, sans-serif; color: rgb(26, 60, 52);"><span style="font-size: 12pt;">Confirm the Index Exists on the Database</span></h1> <p style="margin: 0cm 0cm 6pt; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">Before applying the fix, verify that the index was successfully created on the database but is missing from the UI.</span></p> <ul style="list-style-type: square; list-style-position: inside;"><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;"><span style="font-size: 10pt;">Navigate to </span><strong><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(192, 57, 43);">sys_db_object.LIST</span></strong><span style="font-size: 10pt;"> in the ServiceNow application navigator.</span></span></li><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;"><span style="font-size: 10pt;">Filter the list using the <strong>Table Name</strong> of the table on which the index was created.</span></span></li><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;"><span style="font-size: 10pt;">Open the relevant table record.</span></span></li><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;"><span style="font-size: 10pt;">Scroll to the <strong>Related Lists</strong> section and open the <strong>Indexes</strong> tab.</span></span></li><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;"><span style="font-size: 10pt;">Check whether the newly created index name appears in this list.</span></span></li></ul> <p style="margin: 0cm 0cm 15pt; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">If the index is <strong>absent from the UI</strong> but confirmed present on the database, proceed with the resolution steps below.</span></p> <h1 style="margin: 15pt 0cm 8pt; font-size: 18pt; font-family: Arial, sans-serif; color: rgb(26, 60, 52);"><span style="font-size: 12pt;">Resolution</span></h1> <p style="margin: 0cm 0cm 6pt; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">Invalidate the table cache using <strong>GlideTableManager</strong> to force the platform to rebuild metadata for the affected table.</span></p> <ul style="list-style-type: square; list-style-position: inside;"><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;"><span style="font-size: 10pt;">Navigate to the <strong>Scripts – Background</strong> module: </span><strong><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(192, 57, 43);">sys.scripts.DO</span></strong></span></li><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt;">Ensure the scope is set to <strong>Global</strong>.</span></li><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt;">Run the following script, replacing <strong><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(192, 57, 43);">{tablename}</span></strong> with the actual table name: </span></li></ul> <table class="MsoNormalTable" style="width: 438.0pt; border-collapse: collapse; border: none;" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="border: solid #CCCCCC 1.0pt; border-left: solid #2D6A4F 1.5pt; background: #F4F9F7; padding: 6.0pt 10.0pt 6.0pt 10.0pt;" valign="top"> <p style="margin: 0cm; font-size: 11pt; font-family: Arial, sans-serif;"><strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #c0392b;">GlideTableManager.invalidateTable("{tablename}");</span></strong></p> </td></tr></tbody></table> <ul style="list-style-type: square; list-style-position: inside;"><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt;">Navigate back to </span><strong><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(192, 57, 43);">sys_db_object.LIST</span></strong><span style="font-size: 10pt;"> and re-open the table record.</span></li><li style="font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt;">Verify that the newly created index is now visible under the <strong>Indexes</strong> tab.</span></li></ul> <h2 style="margin: 12pt 0cm 5pt; font-size: 13pt; font-family: Arial, sans-serif; color: rgb(45, 106, 79);"><span style="font-size: 10pt;">Example</span></h2> <p style="margin: 0cm 0cm 6pt; font-size: 11pt; font-family: Arial, sans-serif;"><span style="font-size: 10.0pt;">If the index was created on the </span><strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #c0392b;">sys_audit</span></strong><span style="font-size: 10.0pt;"> table:</span></p> <table class="MsoNormalTable" style="width: 438.0pt; border-collapse: collapse; border: none;" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="border: solid #CCCCCC 1.0pt; border-left: solid #2D6A4F 1.5pt; background: #F4F9F7; padding: 6.0pt 10.0pt 6.0pt 10.0pt;" valign="top"> <p style="margin: 0cm; font-size: 11pt; font-family: Arial, sans-serif;"><strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #c0392b;">GlideTableManager.invalidateTable("sys_audit");</span></strong></p> </td></tr></tbody></table> <span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div></section></div></article></div>