How do find the serial Numbers of two columns in a table directly from their data?Take this sample form.
dt = Open( "$SAMPLE_DATA/Lung Cancer.jmp" );
Columns 1 and 2 comprise data that does not duplicate.
Now what do want to do for JSL to find a single serial number that combines "NonSmoker" and "Cancer"?
Let's say have a lot of rows.

Thanks!
ScriptingRe: How do find the serial Numbers of two columns in a table directly from their data??????
dt = Open( "$SAMPLE_DATA/Lung Cancer.jmp" );
show(dt<<GET rows="" where=""></GET>
Re: How do find the serial Numbers of two columns in a table directly from their data?Thank Jim!
Yes, exactly.

How do get
r = 3
ã
Rather than
r = [3]
Re: How do find the serial Numbers of two columns in a table directly from their data?Matrix
dt = Open( "$SAMPLE_DATA/Lung Cancer.jmp" );
mat = dt << get rows where( :smoker == "NonSmoker" & :lung Cancer == "Cancer" );
r = mat[1, 1];
But I don't understand that if I write this directly, it won't work:
dt = Open( "$SAMPLE_DATA/Lung Cancer.jmp" );
r=dt<<GET rows="" where=""></GET>
Thanks!
Re: How do find the serial Numbers of two columns in a table directly from their data?The issue is that JMP is getting confused on how to construct the final outcome of your statement
r=dt<<get rows where(:smoker=="NonSmoker" & :lung Cancer == "Cancer" )[1,1];
If you use a pair of "()" to help JMP understand that [1,1] is talking about what is returned from the Get Rows Where(), your code will work.
r=(dt<<GET rows="" where=""></GET>
Re: How do find the serial Numbers of two columns in a table directly from their data?Thank Jim!
I'm still learning basic grammar.