<?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 Re: ImportSet Error Messages in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224518#M876502</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another question,&amp;nbsp;can I use existing data source and attach spreadsheet that user has submitted in this record producer? how can I achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for help!&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2018 14:51:01 GMT</pubDate>
    <dc:creator>questsal78</dc:creator>
    <dc:date>2018-09-14T14:51:01Z</dc:date>
    <item>
      <title>ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224512#M876496</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm using a record producer to import data into a custom table for updates. Everything is working fine except, I'm unable to show end user a message showing how many rows were there, how many are updated and how many ignored just like below: End user is not admin so they can only see messages via record producer.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/80503iE097673BF40D11A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is my code:&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;// Set the following variables with the name of your import set table and task id column

var importSetTableName = "u_integrate_renewal_orders";

var transformMapID = "xxxxxxxxxxxxx"; // removed actual sys_id with text

// Setup data source for attachment

current.name = "Renewal Import " + now();

current.import_set_table_name = importSetTableName;

current.file_retrieval_method = "Attachment";

current.type = "File";

current.format = "Excel";

current.header_row = 1;

current.sheet_number = 1;

current.insert();

// Process excel file

var loader = new GlideImportSetLoader();

var importSetRec = loader.getImportSetGr(current);

var ranload = loader.loadImportSetTable(importSetRec, current);

importSetRec.state = "loaded";

importSetRec.update();


// Transform import set

var transformWorker = new GlideImportSetTransformerWorker(importSetRec.sys_id, transformMapID);

transformWorker.setBackground(true);

transformWorker.start();

// Take user to task

gs.addInfoMessage("Data import may take time load, please reload record to see all the assets.");



// Since we inserted data source already, abort additional insert by record producer

current.setAbortAction(true);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I don't know how to get this information from import set/transform map for end user. Is there a way to achieve this in record producer script?&lt;/P&gt;
&lt;P&gt;Please advise.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 15:38:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224512#M876496</guid>
      <dc:creator>questsal78</dc:creator>
      <dc:date>2018-09-12T15:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224513#M876497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Since the transform may take long time depending on the import set rows you can't force the user to stay on the same page.&lt;/P&gt;
&lt;P&gt;Why not send an email notification instead with details:&lt;/P&gt;
&lt;P&gt;total records&lt;/P&gt;
&lt;P&gt;ignored&lt;/P&gt;
&lt;P&gt;skipped&lt;/P&gt;
&lt;P&gt;inserted&lt;/P&gt;
&lt;P&gt;updated&lt;/P&gt;
&lt;P&gt;Notification table:&amp;nbsp;&lt;/P&gt;
&lt;DIV class="col-xs-10 col-sm-9 col-md-6 col-lg-5 form-field input_controls"&gt;
&lt;P id="sys_readonly.sysevent_email_action.collection" class="form-control-static"&gt;Transform History [sys_import_set_run]&lt;/P&gt;
&lt;P class="form-control-static"&gt;Trigger condition: State is one of Complete or Complete with errors&lt;/P&gt;
&lt;P class="form-control-static"&gt;Set.Data Source.Name =&amp;gt; your data source name&lt;/P&gt;
&lt;P class="form-control-static"&gt;template.print("Total:"+current.total+"&amp;lt;br/&amp;gt;");&lt;BR /&gt; template.print("Inserts:"+current.inserts+"&amp;lt;br/&amp;gt;");&lt;BR /&gt; template.print("Updates:"+current.updates+"&amp;lt;br/&amp;gt;");&lt;BR /&gt; template.print("Ignored:"+current.ignored+"&amp;lt;br/&amp;gt;");&lt;BR /&gt; template.print("Skipped:"+current.skipped+"&amp;lt;br/&amp;gt;");&lt;BR /&gt; template.print("Errors:"+current.errors+"&amp;lt;br/&amp;gt;");&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.&lt;BR /&gt;Thanks&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 15:42:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224513#M876497</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2018-09-12T15:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224514#M876498</link>
      <description>&lt;P&gt;Thank you for quick response. Yes, emailing notification will work for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 15:57:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224514#M876498</guid>
      <dc:creator>questsal78</dc:creator>
      <dc:date>2018-09-12T15:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224515#M876499</link>
      <description>&lt;P&gt;Sorry, where I can set Data Source Name in notification?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 16:02:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224515#M876499</guid>
      <dc:creator>questsal78</dc:creator>
      <dc:date>2018-09-12T16:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224516#M876500</link>
      <description>&lt;P&gt;Hi, how I can set that data source to this notification unless doing a mailscript with glide record query.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 18:38:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224516#M876500</guid>
      <dc:creator>questsal78</dc:creator>
      <dc:date>2018-09-12T18:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224517#M876501</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In email notification trigger condition you can specify for which data source it should trigger.&lt;/P&gt;
&lt;P&gt;No need for glide record since the current import set run should take card of that.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 14:38:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224517#M876501</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2018-09-13T14:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224518#M876502</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another question,&amp;nbsp;can I use existing data source and attach spreadsheet that user has submitted in this record producer? how can I achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for help!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:51:01 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224518#M876502</guid>
      <dc:creator>questsal78</dc:creator>
      <dc:date>2018-09-14T14:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: ImportSet Error Messages</title>
      <link>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224519#M876503</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Yes you can attach the attachment from record producer to data source.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 15:37:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/importset-error-messages/m-p/2224519#M876503</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2018-09-14T15:37:54Z</dc:date>
    </item>
  </channel>
</rss>

