<h2>"Model is not found or is in build status;Row transform ignored by onBefore script;Parent structure is complete moving to desired state" and state is Ignored</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Issue </h3><section><style type="text/css"><!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #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="padding-left: 40px;"><span style="font-size: 10pt; font-family: verdana, geneva;">When importing the bulk import in the Enterprise Asset Management module, we see below error:</span></p> <p style="padding-left: 40px;"><span style="font-size: 10pt; font-family: verdana, geneva;">"Model is not found or is in build status;Row transform ignored by onBefore script;Parent structure is complete moving to desired state" and state is Ignored</span></p> <span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div></section></div><div ><h3 >Symptoms</h3><section><style type="text/css"><!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #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="padding-left: 40px;"><span style="font-family: verdana, geneva; font-size: 10pt;">1. Open EAM Workspace -> Admin Center -> Bulk Import -> Create Assets</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">2. Use the Excel spreadsheet.</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">3. Wait for import, see comment section that says "Model is not found or is in build status;Row transform ignored by onBefore script;Parent structure is complete moving to desired state". </span></p> <span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div></section></div><div ><h3 >Release</h3><section><style type="text/css"><!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #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="padding-left: 40px;"><span style="font-family: verdana, geneva; font-size: 10pt;">Any Version</span></p> <span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div></section></div><div ><h3 >Cause</h3><section><style type="text/css"><!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #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="padding-left: 40px;"><span style="font-family: verdana, geneva; font-size: 10pt;">[-] The Below code from the EAMImportTransform script include is responsible for populating the model on the staging table "sn_eam_asset_import_row"</span><br /><br /><span style="font-family: verdana, geneva; font-size: 10pt;">EAMImportTransform.preprocessAsset = function(importSetId) {<!-- --></span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">// Pre-populate model for each asset row</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">var stagingGr = new GlideRecord(EAMImportConstants.ASSET_STAGING_TABLE);</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.addQuery('sys_import_set', importSetId);</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.addNotNullQuery('manufacturer');</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.addNotNullQuery('model_name');</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.addNotNullQuery('model_number');</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.query();</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">var utils = new global.AssetUtils();</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">while (stagingGr.next()) {<!-- --></span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">var modelGr = EAMImportTransform.getModelRecord(</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.manufacturer, stagingGr.model_name, stagingGr.model_number</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">);</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">if (modelGr.next()) {<!-- --></span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.setValue('model', modelGr.getUniqueValue());</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">// Default quantity to 1 for serialized assets</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">if (utils.getAssetOrConsumable(modelGr) !== 'consumable') {<!-- --></span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.setValue('quantity', '1');</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">}</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.update();</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">}</span><br /><br /><span style="font-family: verdana, geneva; font-size: 10pt;">[-]From the above code, getModelRecord() to look up an existing Model CI (product model) based on:</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">[1]Manufacturer</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">[2]Model Name</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">[3]Model Number</span><br /><br /><span style="font-family: verdana, geneva; font-size: 10pt;">If the result contains a record ->execute the next steps.</span><br /><br /><span style="font-family: verdana, geneva; font-size: 10pt;">[-]Populate the model reference field</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">stagingGr.setValue('model', modelGr.getUniqueValue());</span><br /><span style="font-family: verdana, geneva; font-size: 10pt;">[-]Links the staging record to the actual model record in the CMDB.</span></p> <span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div></section></div><div ><h3 >Resolution</h3><section><style type="text/css"><!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #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="padding-left: 40px;"><span style="font-family: verdana, geneva; font-size: 10pt;">When importing data from Excel, if no model is available in the cmdb_model table, the flow is stopped, creating an issue.</span><br /><br /><span style="font-family: verdana, geneva; font-size: 10pt;">Please add models to the table first and then proceed further.</span></p> <span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div></section></div></article></div>