cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-776848%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESet%20File%20List%20with%20a%20variable%20during%20Multiple%20File%20Import%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776848%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20using%20JMP%2018.0.1%20and%20I%20noticed%20the%20new%20option%20for%20Multiple%20File%20Import%20that%20allows%20the%20user%20to%20provide%20a%20list%20files%20(or%20directories)%20to%20import.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20successfully%20use%20it%20in%20a%20script%20like%20so%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EMultiple%20File%20Import(%0A%09%26lt%3B%3CSET%20use%3D%22%22%20file%3D%22%22%20list%3D%22%22%3E%3C%2FSET%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20when%20I%20try%20to%20move%20the%20list%20to%20a%20variable%2C%20so%20that%20I%20can%20add%2Fremove%20elements%20dynamically%2C%20the%20import%20stops%20working.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EfileList%20%3D%20%7B%20%22C%3A%5Cfile1.csv%22%2C%20%22C%3A%5Cfile2.csv%22%2C%20%22C%3A%5Cfile3.csv%22%20%20%7D%3B%0A%0AMultiple%20File%20Import(%0A%09%26lt%3B%3CSET%20use%3D%22%22%20file%3D%22%22%20list%3D%22%22%3E%3C%2FSET%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere's%20no%20error%2C%20but%20zero%20tables%20are%20created.%20Even%20when%20I%20replace%20%22Import%20Data%22%20with%20%22%3CSPAN%3ECreate%20Window%22%2C%20I%20see%20that%20in%20the%20first%20case%20the%20list%20is%20populated%2C%20whereas%20it%20stays%20empty%20in%20the%20second%20case.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAm%20I%20missing%20something%20here%3F%20Am%20I%20trying%20to%20set%20this%20option%20in%20the%20wrong%20way%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-776848%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomation%20and%20Scripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-776878%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Set%20File%20List%20with%20a%20variable%20during%20Multiple%20File%20Import%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776878%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ethis%20is%20a%20known%20bug%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMP-Wish-List%2FAdvanced-syntax-highlighting-in-JSL-Editor-does-the-function%2Fidc-p%2F772428%2Fhighlight%2Ftrue%23M5779%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMP-Wish-List%2FAdvanced-syntax-highlighting-in-JSL-Editor-does-the-function%2Fidc-p%2F772428%2Fhighlight%2Ftrue%23M5779%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EReply%20from%20JMP%20support%20(TS%20-%2000152969)%3B%3CBR%20%2F%3E%3CEM%3EI've%20spoken%20with%20Development%20about%20the%20issue.%20The%20issue%20is%20a%20defect%20and%20I%20have%20reported%20it%20to%20Development%20so%20it%20can%20be%20resolved%20in%20a%20future%20JMP%20version.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMP-Wish-List%2FAdvanced-syntax-highlighting-in-JSL-Editor-does-the-function%2Fm-p%2F729460%23U729460%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-idea-thread%20lia-fa-icon%20lia-fa-idea%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3EAdvanced%20syntax%20highlighting%20in%20JSL%20Editor%20-%20does%20the%20function%20evaluate%20it's%20argument%3F%3C%2FA%3E%26nbsp%3B%26nbsp%3Bcould%20help%20to%20find%20out%20to%20which%20level%20an%20argument%20is%20evaluated%20and%20if%20Eval%20is%20needed%20or%20a%20more%20complex%20structure%20like%20Substitute%20(Expr()%2C%20...)%20or%26nbsp%3BEval(Eval%20Expr(....%20Expr(arg)....%20))%26nbsp%3B%20-%20like%20in%20this%20case.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBesides%20advanced%20syntax%20highlighting%20-%20for%20arguments%20where%20such%20a%20complex%20structure%20is%20mandatory%2C%20JSL%20Editor%20could%20directly%20show%20a%20warning%20that%20this%20syntax%20is%20missing.%20Same%20for%20cases%20where%20Eval%20(arg)%20is%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScripters%2C%20please%20give%20the%20wish%20a%20Kudo!%3CBR%20%2F%3EExpression%20handling%20in%20JSL%20will%20be%20%3CU%3E%3CSTRONG%3Efun%3C%2FSTRONG%3E%20%3C%2FU%3Eonce%20the%20new%20functionality%20is%20available.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
simopod
Level I

Set File List with a variable during Multiple File Import

I'm using JMP 18.0.1 and I noticed the new option for Multiple File Import that allows the user to provide a list files (or directories) to import.

 

I can successfully use it in a script like so:

 

Multiple File Import(
	<<Set Use File List( 1 ),
	<<Set File List( { "C:\file1.csv", "C:\file2.csv", "C:\file3.csv"  } ),
	<<Set Import Mode( "CSVData" ),
	<<Set Stack Mode( "Stack Similar" ),
) << Import Data;

 

However, when I try to move the list to a variable, so that I can add/remove elements dynamically, the import stops working.

 

 

fileList = { "C:\file1.csv", "C:\file2.csv", "C:\file3.csv"  };

Multiple File Import(
	<<Set Use File List( 1 ),
	<<Set File List( fileList ),
	<<Set Import Mode( "CSVData" ),
	<<Set Stack Mode( "Stack Similar" ),
) << Import Data;

 

There's no error, but zero tables are created. Even when I replace "Import Data" with "Create Window", I see that in the first case the list is populated, whereas it stays empty in the second case.

 

Am I missing something here? Am I trying to set this option in the wrong way?

Thanks!

 

1 REPLY 1
hogi
Level XIII

Re: Set File List with a variable during Multiple File Import

this is a known bug:
https://community.jmp.com/t5/JMP-Wish-List/Advanced-syntax-highlighting-in-JSL-Editor-does-the-funct... 

Reply from JMP support (TS - 00152969);
I've spoken with Development about the issue. The issue is a defect and I have reported it to Development so it can be resolved in a future JMP version.

 

Advanced syntax highlighting in JSL Editor - does the function evaluate it's argument?  could help to find out to which level an argument is evaluated and if Eval is needed or a more complex structure like Substitute (Expr(), ...) or Eval(Eval Expr(.... Expr(arg).... ))  - like in this case.

 

Besides advanced syntax highlighting - for arguments where such a complex structure is mandatory, JSL Editor could directly show a warning that this syntax is missing. Same for cases where Eval (arg) is needed.

 

Scripters, please give the wish a Kudo!
Expression handling in JSL will be fun once the new functionality is available.

Recommended Articles