<?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>topic Re: Multiple File Import fails quietly when reading file from folder protected by Privacy settings in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/497230#M73448</link>
    <description>&lt;P&gt;After investigating this issue further, I have reported this issue to Development. It seems macOS is not presenting the necessary prompt (&lt;EM&gt;JMP Pro 16.app would like to access files in your &amp;lt;&amp;gt; folder&lt;/EM&gt;) for each directory.&amp;nbsp;It only seems to do so for the Downloads directory. Other directories are ignored completely. Our Development team will continue to explore this issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding determining when MFI import may be failing when folder access is not granted, you may want to consider using the following:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mfi = Multiple File Import(

&amp;lt;&amp;lt;Set Folder( "$DESKTOP" ),

&amp;lt;&amp;lt;Set Name Filter( "*.csv;" ),

&amp;lt;&amp;lt;Set Name Enable( 1 )

) &amp;lt;&amp;lt; Import Data;

Show( mfi );
 
If( N Items( mfi ) == 0,

Caption( "No Files Imported" );

Stop();

);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 01 Jun 2022 13:47:29 GMT</pubDate>
    <dc:creator>Dahlia_Watkins</dc:creator>
    <dc:date>2022-06-01T13:47:29Z</dc:date>
    <item>
      <title>Multiple File Import fails quietly when reading file from folder protected by Privacy settings</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/483510#M72800</link>
      <description>&lt;P&gt;Starting with Catalina, Mac OS provides support for Privacy controls on certain folders. &amp;nbsp;If, for example, a script tries to read a file on the Desktop with &lt;STRONG&gt;Multiple File Import&lt;/STRONG&gt;, you'll get a popup saying that &lt;EM&gt;JMP Pro 16.app would like to access files in your Desktop folder&lt;/EM&gt;. &amp;nbsp;If you select &lt;EM&gt;OK&lt;/EM&gt;, everything works fine. &amp;nbsp;But if you select &lt;EM&gt;Don't Allow&lt;/EM&gt;, the MFI instruction will fail without a runtime error, but might fail later (since a data table was not returned). &amp;nbsp;Some example code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;fileList = Pick File( "Choose Insight File(s)", "~/Downloads", {"csvOnly|csv"}, 1, 0, "", "multiple" );&lt;BR /&gt;:&lt;BR /&gt;Multiple File Import( ... );&lt;BR /&gt;dt = Current Data Table();&lt;BR /&gt;allCols = dt &amp;lt;&amp;lt; Get Column Names( String );&lt;/PRE&gt;&lt;P&gt;In this case, there is no Current Data Table, so dt is not defined, and the Get Column Names instruction fails with the following message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Send Expects Scriptable Object in access or evaluation of 'Send' , dt &amp;lt;&amp;lt;  /*###*/Get Column Names( String ) /*###*/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The question is: &amp;nbsp;What is the recommended way to determine that the Multiple File Import command failed to open and read a file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After one selects Don't Allow to the popup, the question won't be asked in the future, and MFI will just quietly fail. &amp;nbsp;(Note that the setting can be changed at any time in System Preferences, Security and Privacy, Privacy, Files and Folders, JMP Pro 16.app.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More broadly, why did the Pick File command allow the Navigation window to access files on the Desktop in the first place? &amp;nbsp;It seems that private folders should be excluded in the Navigation window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also see that this is not an issue in JMP 15. &amp;nbsp;So respecting folder privacy is apparently something that was added in JMP 16. &amp;nbsp;(I'm running 16.2.0.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:47:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/483510#M72800</guid>
      <dc:creator>SteveTerry</dc:creator>
      <dc:date>2023-06-10T23:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple File Import fails quietly when reading file from folder protected by Privacy settings</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/484657#M72881</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think that you might want to contact technical support (&lt;A href="mailto:support@jmp.com" target="_blank"&gt;support@jmp.com&lt;/A&gt;) with this query.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 06:43:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/484657#M72881</guid>
      <dc:creator>Phil_Kay</dc:creator>
      <dc:date>2022-05-06T06:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple File Import fails quietly when reading file from folder protected by Privacy settings</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/497230#M73448</link>
      <description>&lt;P&gt;After investigating this issue further, I have reported this issue to Development. It seems macOS is not presenting the necessary prompt (&lt;EM&gt;JMP Pro 16.app would like to access files in your &amp;lt;&amp;gt; folder&lt;/EM&gt;) for each directory.&amp;nbsp;It only seems to do so for the Downloads directory. Other directories are ignored completely. Our Development team will continue to explore this issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding determining when MFI import may be failing when folder access is not granted, you may want to consider using the following:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mfi = Multiple File Import(

&amp;lt;&amp;lt;Set Folder( "$DESKTOP" ),

&amp;lt;&amp;lt;Set Name Filter( "*.csv;" ),

&amp;lt;&amp;lt;Set Name Enable( 1 )

) &amp;lt;&amp;lt; Import Data;

Show( mfi );
 
If( N Items( mfi ) == 0,

Caption( "No Files Imported" );

Stop();

);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jun 2022 13:47:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/497230#M73448</guid>
      <dc:creator>Dahlia_Watkins</dc:creator>
      <dc:date>2022-06-01T13:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple File Import fails quietly when reading file from folder protected by Privacy settings</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/499580#M73494</link>
      <description>&lt;P&gt;Thanks so much, Dahlia, for your patience and determination in helping to characterize this. &amp;nbsp;I look forward to a future JMP update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I implemented the logic you provided, and my script now works very well and predictably.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 19:53:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-File-Import-fails-quietly-when-reading-file-from-folder/m-p/499580#M73494</guid>
      <dc:creator>SteveTerry</dc:creator>
      <dc:date>2022-06-03T19:53:56Z</dc:date>
    </item>
  </channel>
</rss>

