Choose Language Hide Translation Bar
Highlighted
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
Highlighted
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
Highlighted

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

Learn it once, use it forever!
Highlighted
uday_guntupalli
Level VIII

Re: N Items() argument must be a list

@markbailey
      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
Highlighted

Re: N Items() argument must be a list

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

Learn it once, use it forever!
Highlighted
Craige_Hales
Staff (Retired)

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
Article Labels

    There are no labels assigned to this post.