cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Aam_jmp
Level IV

N Items() argument must be a list

When I run my script in JMP 13, everything works fine. However, with JMP 12, I get an error saying N Items() argument must be a list. Why is that so? How can I solve this problem? Thank you for any input.

5 REPLIES 5
uday_guntupalli
Level VIII

Re: N Items() argument must be a list

@Aam_jmp,
           Could you possibly share the code ? Typically, the error occurs when The parameter you are passing to the function is not a list. But since you are not getting the same error in JMP 13, I am assuming there is something else at play here. Also, could you do the following: 

Assuming List1 is the parameter you are passing to the function, add a Is List() to test if it is a list indeed. 

Is List(List1); 

If the result is 0, then try N Items(List(List1)) to see if that will fix the issue in JMP 12

Best
Uday

Re: N Items() argument must be a list

The N items() function in older versions of JMP only worked with lists. The function has been extended. Here is the Scripting Index entry for this function in JMP 14:

 

Capture.PNG

uday_guntupalli
Level VIII

Re: N Items() argument must be a list

@Mark_Bailey
      However, the issue he was posting was referring to JMP versions 13 and 12, while it is informative, I don't see how the extended functionality could have anything to do with the case posted by @Aam_jmp ?

Best
Uday

Re: N Items() argument must be a list

Version 12 report an error. That version is more restrictive than Version 13.

Craige_Hales
Super User

Re: N Items() argument must be a list

13 says

Returns the number of items in a list, the number of keys in an associative array, or the number of children of a display box.

 

https://community.jmp.com/t5/Discussions/Should-quot-n-items-quot-be-more-robust/m-p/16627

Craige