Hi Keisuke,

The link you have provided, unfortunately, is in Japanese ;-)

Are we talking about the same command? Because in the v16R6 documentation, it 
says:

If you pass an empty string to fileName 
<http://doc.4d.com/4Dv16R6/4D/16-R6/IMPORT-DATA.301-3548317.en.html#>, IMPORT 
DATA displays the standard save file dialog box, allowing the user to define 
the name, type, and location of the import file. Once the dialog box has been 
accepted, the Document system variable contains the access path and the name of 
the file. If the user clicks Cancel, the execution of the command is stopped 
and the OK system variable is set to 0.

Turns out this is a bug in the 64bit versions of 4D (I have tested with 4D 
v16R5 and v16R6). It DOES work in 32bit versions; I have tested with 15.5.

The workaround is:

$doc:=Open document("")         
If (ok=1)
CLOSE DOCUMENT($doc)
IMPORT DATA(document;$ref)
End if 
        

Regards,

Rudy Mortier
Two Way Communications bvba 



> On 1 May 2018, at 00:47, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> the docs reads:
> 
> When you pass this parameter, the import is carried out directly, without any 
> user intervention (unless you use the * option, see below).
> 
> http://doc.4d.com/4Dv16R6/4D/16-R6.1660/Not-for-32-bit-versions_3546700.999-857020.ja.html
> 
>> 2018/04/29 20:39、Two Way Communications via 4D_Tech <4d_tech@lists.4d.com> 
>> のメール:
>> However, If I use it in 4D v16R5,  the ‘Import Data’ command does not open 
>> the file dialog, but returns ok=0?
>> Has anything changed?
> 
> 
> 
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to