"New" state of hardware product models after normalization

Shivani Dubey
Tera Contributor

Hello Team,

 

I am performing HAM normalization. Plugins installed, content library activated and scheduled job was run manually as "Execute Now". Then I configured "Normalization Status" field on list view. Few of the hardware product models showed the status "Normalized", few showed "Partially Normalized", few showed "Manufacturer Normalized". Fine with this.

But there are many Product Models which are still in "New" state. It means that these product models are not being processed for Normalization. Please suggest an approach or solution so as to process these product models for Normalization

 

Your efforts will be appreciated.

Thank you very much.

2 REPLIES 2

Amit Gujarathi
Giga Sage
Giga Sage

HI @Shivani Dubey ,
I trust you are doing great.

To process the product models in the "New" state for normalization, you can follow the steps beloIdentify the product models that are in the "New" state. You can do this by creating a ServiceNow query to filter the records based on the "Normalization Status" field with a value of "New". Here's an example of the query:

 

var gr = new GlideRecord('your_table_name');
gr.addQuery('normalization_status', 'New');
gr.query();

 

 

  1. Iterate through the records returned by the query and trigger the normalization process for each product model. You can achieve this by updating the "Normalization Status" field with an appropriate value, such as "Processing" or "In Progress", to indicate that the normalization is underway. Here's an example:

 

 

 

while (gr.next()) {
  gr.normalization_status = 'Processing';
  gr.update();
  // Perform the normalization process for the product model here
}

 

  1. Perform the necessary normalization steps for each product model within the iteration. This process will depend on your specific requirements and normalization rules. You can implement custom logic or leverage existing functionality within ServiceNow to normalize the product models. Remember to update the "Normalization Status" field accordingly to reflect the progress or outcome of the normalization process.

  2. Once the normalization is completed for a product model, update the "Normalization Status" field with an appropriate value, such as "Normalized" or "Partially Normalized", based on the outcome. Here's an example:

 

gr.normalization_status = 'Normalized';
gr.update();

 

  1. Repeat steps 3 and 4 for each product model within the iteration until all the "New" product models have been processed for normalization.

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Hello Amit ,

I am facing also same Problem . After executing  the background scrip Normalize status not get updated .

This Solution is not working  .

Can you put any alternative solution ? 

 

Thank you