cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to move from signal modeling to system modeling at the first JMP Aerospace Analytics webinar. Register. June 18, 1 p.m. US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Check if a value belongs to a list of value

In a condition, I want to check if a value belongs to a list composed of several values. What is the simplest syntax ?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Check if a value belongs to a list of value

Usually Contains() is enough. Sometimes Contains Item() . See scripting index for more examples

Names Default To Here(1);
name_list={"Katie", "Louise", "Jane", "Jaclyn"};
r = Contains(name_list, "Louise");
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Check if a value belongs to a list of value

Usually Contains() is enough. Sometimes Contains Item() . See scripting index for more examples

Names Default To Here(1);
name_list={"Katie", "Louise", "Jane", "Jaclyn"};
r = Contains(name_list, "Louise");
-Jarmo

Recommended Articles