是否有高效的功能或JSL可供選擇?大家好!
例如,選擇類似於以下兩個文件的操作:
如果兩列中的每一個都包含關鍵字,則為true。
像“ ANY()”這樣的函數可以匹配文本嗎?
謝謝!

d2 = Open( "$SAMPLE_DATA\Pizza Profiles.jmp" );
xF = {};
yF = {};
For( j = 1, j <= 4, j++,
Insert Into( xF, d2[j, "ID"] );
Insert Into( yF, d2[j, "Cheese"] );
);
dt = Open( "$SAMPLE_DATA\Pizza Combined No Choice.jmp" );
dt << Select Where( :Cheese == Any( Eval( yF ) ) & :Profile Name == Any( Eval( xF ) ) );
Wait( 0 );
d3 = dt << Subset( Output Table( "text" ), Selected Rows( 1 ), selected columns( 0 ) );
Wait( 0 );當然,在這裡不能使用“ any”。
回复:對於這種選擇,是否有高效的功能或JSL?你好
在這種情況下,contains()函數可能就是您想要的:
https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/td-p/299
d2 = Open( "$SAMPLE_DATA\Pizza Profiles.jmp" );
xF = {};
yF = {};
For( j = 1, j <= 4, j++,
Insert Into( xF, d2[j, "ID"] );
Insert Into( yF, d2[j, "Cheese"] );
);
dt = Open( "$SAMPLE_DATA\Pizza Combined No Choice.jmp" );
dt << Select Where( contains(yf,:Cheese) & contains(xf,:Profile Name));
Wait( 0 );
d3 = dt << Subset( Output Table( "text" ), Selected Rows( 1 ), selected columns( 0 ) );
Wait( 0 );