cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
View Original Published Thread

values in columns

hcarr01
Level VI

Good morning,

 

In a JMP data table, I am looking for data in 2 columns.

 

To give you an example:
If in my column 2 I have the value “S” and in my column 5 I have the value 6 then I execute operations, otherwise I close the table and I open another one.

 

I'm using the following code, but it's not working properly, I'm trying to understand why.

 

Names Default To Here (1);

dt = current data table();

If(Column(dt,2) == "S" & Column(dt,5) == "6",
 show(1);
 //code
 ,
 show(2);
 //code
);

From my table and the script, there is an error because it returns me the value 2 when it should return me the value 1.

 

Thanks for your help !

This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User


Re: valeurs dans les colonnes

Use << Get Rows Where and check for N Items from the returned list

<< get rows where(Column(dt, 1)[] == 3 & Column(dt, 2)[] == 2)
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User


Re: valeurs dans les colonnes

Use << Get Rows Where and check for N Items from the returned list

<< get rows where(Column(dt, 1)[] == 3 & Column(dt, 2)[] == 2)
-Jarmo
hcarr01
Level VI

Re: values in columns

Great thank you, it works correctly with this:

 

Names Default To Here (1);

dt = current data table();

A = dt << get rows where(Column(dt, 2)[] == 3  & Column(dt,4)[] == 6);

If( length(A) > 0,
   show(1);
,
   show(2);
);

This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .