<?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 Identify all the field changes in a table record in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2565949#M998633</link>
    <description>&lt;P&gt;Hi, i am trying to identify all the changes in a lot of records in a specify table, in this case cmdb_ci_server, the field is state, the discovery made its changes but i need to know the amount of all the records that update the state field, i was searching in the sys_history_line table, but i can't search the records in a massive way, only one by one, for example "state is one of", my question is if exist another way to identify all the records with these changes by field in a table and the date?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 20:50:00 GMT</pubDate>
    <dc:creator>Ra_l Ruvalcaba</dc:creator>
    <dc:date>2023-05-18T20:50:00Z</dc:date>
    <item>
      <title>Identify all the field changes in a table record</title>
      <link>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2565949#M998633</link>
      <description>&lt;P&gt;Hi, i am trying to identify all the changes in a lot of records in a specify table, in this case cmdb_ci_server, the field is state, the discovery made its changes but i need to know the amount of all the records that update the state field, i was searching in the sys_history_line table, but i can't search the records in a massive way, only one by one, for example "state is one of", my question is if exist another way to identify all the records with these changes by field in a table and the date?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 20:50:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2565949#M998633</guid>
      <dc:creator>Ra_l Ruvalcaba</dc:creator>
      <dc:date>2023-05-18T20:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Identify all the field changes in a table record</title>
      <link>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2566008#M998653</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please review:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.servicenow.com/search?q=Auditing" target="_blank"&gt;https://docs.servicenow.com/search?q=Auditing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.servicenow.com/bundle/utah-platform-security/page/administer/time/concept/c_AuditedTables.html" target="_blank"&gt;https://docs.servicenow.com/bundle/utah-platform-security/page/administer/time/concept/c_AuditedTables.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;that has links to "History sets".&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 01:10:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2566008#M998653</guid>
      <dc:creator>Bert_c1</dc:creator>
      <dc:date>2023-05-19T01:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Identify all the field changes in a table record</title>
      <link>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2566076#M998667</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/195239"&gt;@Ra_l Ruvalcaba&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I trust you are doing fine.&lt;BR /&gt;&lt;SPAN&gt;To identify all the changes in the "state" field of the "cmdb_ci_server" table and obtain the count of records that have been updated, you can use a GlideRecord query in ServiceNow. &lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Create a new GlideRecord instance for the cmdb_ci_server table
var gr = new GlideRecord('cmdb_ci_server');

// Add a query condition for the desired state values
gr.addQuery('state', 'IN', ['value1', 'value2', 'value3']); // Replace 'value1', 'value2', 'value3' with your desired state values

// Add an additional query condition for the desired date range, if needed
gr.addQuery('sys_updated_on', '&amp;gt;=', 'yyyy-MM-dd 00:00:00'); // Replace 'yyyy-MM-dd' with your desired start date

// Add another query condition for the desired date range, if needed
gr.addQuery('sys_updated_on', '&amp;lt;=', 'yyyy-MM-dd 23:59:59'); // Replace 'yyyy-MM-dd' with your desired end date

// Execute the query
gr.query();

// Get the count of records that match the query
var recordCount = gr.getRowCount();

// Print the count of updated records
gs.info('Number of records updated: ' + recordCount);&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 May 2023 03:50:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2566076#M998667</guid>
      <dc:creator>Amit Gujarathi</dc:creator>
      <dc:date>2023-05-19T03:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Identify all the field changes in a table record</title>
      <link>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2568762#M999702</link>
      <description>&lt;P&gt;The query takes the updates anyway you update another field, for example i updated the state in april and the ip address in may, with this query i get the records updated in may with this state, but not the change of the state&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 00:04:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/identify-all-the-field-changes-in-a-table-record/m-p/2568762#M999702</guid>
      <dc:creator>Ra_l Ruvalcaba</dc:creator>
      <dc:date>2023-05-23T00:04:57Z</dc:date>
    </item>
  </channel>
</rss>

