<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged import</title>
<link>https://overflow.efficy.io/?qa=tag/import</link>
<description>Powered by Question2Answer</description>
<item>
<title>Send file with AJAX and method POST from a new page with a connected user</title>
<link>https://overflow.efficy.io/?qa=6540/send-file-with-ajax-method-post-from-page-with-connected-user</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I try to create a new page for a connect user. but I don't know why, I can't send an ajax request with a file parameter.&lt;/p&gt;

&lt;p&gt;when I test my code without select a file in my html form and submit, all is good, a log file is created and this console log message : &quot;value : undefined&quot; appear (it's undefined cause I don't give a file)&lt;/p&gt;

&lt;p&gt;But when I select a file, I haven't file log created and an empty message in the console.&lt;/p&gt;

&lt;p&gt;I don't understand why I couldn't send a file from ajax ?  &lt;/p&gt;

&lt;p&gt;here my html code : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%LoadMacros(&quot;MacroDesktop&quot;)%&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;%UseScript('js/config/require.config.js', fixedpath=T, data-custombase='%%GetCustomBase()', data-dealerbase='%%GetDealerBase()')%&amp;gt;
    &amp;lt;%Macro('RequireConfigDealer', evaluate=T)%&amp;gt;
    &amp;lt;%Macro('RequireConfigCustom', evaluate=T)%&amp;gt;
    &amp;lt;%UseScript('../lib/js/vendor/require.js', fixedpath=T)%&amp;gt;
    &amp;lt;%UseScript(&quot;scripts/Base&quot;, fixedline=T)%&amp;gt;
    &amp;lt;%UseScript(&quot;custom/Custom&quot;, fixedline=T, ifexists=T)%&amp;gt;
    &amp;lt;script&amp;gt;
        function Loaded() {
            requirejs(['jquery'], function ($) {
                $('#upload').click(function () {
                    var url = 'dialog?_macrofile=MacroAjax&amp;amp;_macro=RunScript&amp;amp;file=test&amp;amp;func=myTest';
                    var element = document.getElementById(&quot;fileupload&quot;);
                    var myfiles = element.files;
                    var data = new FormData();
                    var i = 0;
                    for (i = 0; i &amp;lt; myfiles.length; i++) {
                        data.append('file' + i, myfiles[i]);
                    }

                    $.ajax({
                        url: url,
                        type: 'POST',
                        contentType: false,
                        data: data,
                        processData: false,
                        cache: false
                    }).done(function (msg) {
                        console.log(msg);
                        if (msg.match(&quot;class=\&quot;efficy-error\&quot;&quot;)) {
                            $('body').html(msg);
                        } else {
                            $('form').append(&quot;OK&quot;);
                        }
                    });
                });
            });
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload=&quot;Loaded()&quot;&amp;gt;
&amp;lt;form enctype=&quot;multipart/form-data&quot;&amp;gt;
    &amp;lt;input type=&quot;file&quot; name=&quot;fileupload&quot; id=&quot;fileupload&quot; /&amp;gt;&amp;lt;br&amp;gt;

    &amp;lt;button type=&quot;button&quot; id=&quot;upload&quot;&amp;gt;Upload&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and here my serverscript file : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/*
@import ReaderPOST from serverjs/ReaderPOST
*/

function myTest()
{
    strSaveTextFile(&quot;C:\\path\\myTest.txt&quot;, &quot;&quot;, false);
    var value = &quot;\ntest : &quot; + Request.argument('myArg') + &quot;\n&quot;;

    value += &quot;utf8Content :\n&quot; + Request.utf8Content + &quot;\n&quot;;

    ReaderPOST.init(Request.utf8Content);

    strSaveTextFile(&quot;C:\\EfficyWebServer\\myTest.txt&quot;, value, true);
    return &quot;value : &quot; + ReaderPOST.getValue(&quot;file0&quot;);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Someone have an idea why my script isn't even executed (no file log =&amp;gt; function isn't exectued)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;I went a little further, and realized that what was causing the problem was the formData. When he is empty (no file selected) the function wanted is called but when he is not, I don't know what happen in the black box but my function isn't called.&lt;br&gt;
Someone know why ? It is an Efficy bug or intentionnal behavior ?&lt;/p&gt;

&lt;p&gt;Really thanks in advance for your help ! &lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6540/send-file-with-ajax-method-post-from-page-with-connected-user</guid>
<pubDate>Fri, 13 May 2022 14:11:30 +0000</pubDate>
</item>
<item>
<title>Error closing DataSynchroRemote when used with a commandline</title>
<link>https://overflow.efficy.io/?qa=2663/error-closing-datasynchroremote-when-used-with-commandline</link>
<description>&lt;p&gt;For a customer we built a DataSynchroRemote to import data from an Excel sheet into Efficy. When performing the import within the DataSynchroRemote user interface, the import is completed without any errors.&lt;/p&gt;

&lt;p&gt;When starting the same DataSynchro from a commandline (with the .dat-file as the commandline parameter,) the import is processed correctly, but an error occurs when the application is closed after completing:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;executable        : DataSynchroRemote.exe&lt;br&gt;
exec. date/time   : 2017-03-31 10:40&lt;br&gt;
version           : 10.0.7987.0&lt;br&gt;
compiled with     : Delphi 2009&lt;br&gt;
madExcept version : 3.0n&lt;br&gt;
callstack crc     : $b943c1eb, $eea85a9b, $eea85a9b&lt;br&gt;
exception number  : 1&lt;br&gt;
exception class   : EAccessViolation&lt;br&gt;
exception message : Access violation at address 005636E3 in module 'DataSynchroRemote.exe'. Read of address 0DA868F0.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2663/error-closing-datasynchroremote-when-used-with-commandline</guid>
<pubDate>Fri, 25 Aug 2017 10:52:34 +0000</pubDate>
</item>
<item>
<title>Projects file importer</title>
<link>https://overflow.efficy.io/?qa=2431/projects-file-importer</link>
<description>&lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;A customer would like to have an additional import button. &lt;br&gt;
Would it also be possible to add this importation functionality in the opportunity page by the project team, or is this hardcoded, since it requires the new sidebar addins?&lt;/p&gt;

&lt;p&gt;KR,&lt;br&gt;
Gert&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2431/projects-file-importer</guid>
<pubDate>Fri, 14 Apr 2017 09:03:45 +0000</pubDate>
</item>
<item>
<title>[2014] Remove Efficy Field mapping</title>
<link>https://overflow.efficy.io/?qa=999/2014-remove-efficy-field-mapping</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;Is there a away to deselect / remove Efficy Field mapping in Easy Import Wizard?&lt;/p&gt;

&lt;p&gt;Or should all Excel columns be explicitly mapped?&lt;/p&gt;

&lt;p&gt;Some fields in our Excel file for import do not need to be imported and Efficy auto-assigns them an incorrect field. &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=11325229364571189801&quot; alt=&quot;see screenshot&quot;&gt;&lt;/p&gt;

&lt;p&gt;Thanks in advance!&lt;/p&gt;
</description>
<category>How to</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=999/2014-remove-efficy-field-mapping</guid>
<pubDate>Mon, 07 Dec 2015 16:49:40 +0000</pubDate>
</item>
<item>
<title>Import launched from Interface.</title>
<link>https://overflow.efficy.io/?qa=404/import-launched-from-interface</link>
<description>&lt;p&gt;Does anyone has already made an import launched from the interface ?&lt;/p&gt;

&lt;p&gt;In this case, I need to make it possible to import an Excel file with a fixed layout from the Company Entity to link contacts.&lt;/p&gt;

&lt;p&gt;Has anyone done this before ? And how to do this in Efficy 2014 ?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=404/import-launched-from-interface</guid>
<pubDate>Thu, 28 May 2015 06:48:32 +0000</pubDate>
</item>
</channel>
</rss>