cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-46546%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EScriptable%5B%5D%20%E6%88%96%E2%80%9C%E5%8F%91%E9%80%81%E6%9C%9F%E6%9C%9B%E5%8F%AF%E7%BC%96%E5%86%99%E8%84%9A%E6%9C%AC%E7%9A%84%E5%AF%B9%E8%B1%A1%E2%80%9D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46546%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3C%2FP%3E%0A%3CP%3E%E6%88%91%E5%B7%B2%E7%BB%8F%E5%B0%9D%E8%AF%95%E4%BA%86%E5%BE%88%E5%A4%9A%E6%96%B9%E6%B3%95%E6%9D%A5%E5%B0%9D%E8%AF%95%E5%9C%A8%E6%88%91%E7%9A%84%E9%A2%84%E8%BF%87%E6%BB%A4%E8%A1%A8%E4%B8%AD%E9%80%89%E6%8B%A9%E5%85%B7%E6%9C%89%20PM%23%3D2%20%E5%92%8C%20Logistic%23%3D1%20%E7%9A%84%E7%89%B9%E5%AE%9A%E8%A1%8C%EF%BC%8C%E4%BD%86%E6%88%91%E8%A6%81%E4%B9%88%E6%94%B6%E5%88%B0%E2%80%9C%E5%8F%91%E9%80%81%E6%9C%9F%E6%9C%9B%E5%8F%AF%E7%BC%96%E5%86%99%E8%84%9A%E6%9C%AC%E7%9A%84%E5%AF%B9%E8%B1%A1%E2%80%9D%E6%B6%88%E6%81%AF%EF%BC%8C%E8%A6%81%E4%B9%88%E6%94%B6%E5%88%B0%E2%80%9C%E5%8F%AF%E7%BC%96%E5%86%99%E8%84%9A%E6%9C%AC%E7%9A%84%5B%5D%E2%80%9D%E6%B6%88%E6%81%AF%EF%BC%8C%E7%84%B6%E5%90%8E%E8%84%9A%E6%9C%AC%E7%BB%88%E6%AD%A2%EF%BC%8C%E6%88%96%E6%97%A0%E9%99%90%E5%BE%AA%E7%8E%AF%E3%80%82%E6%9C%89%E4%BA%BA%E5%8F%AF%E4%BB%A5%E5%B8%AE%E5%8A%A9%E8%A7%A3%E5%86%B3%E6%88%91%E6%97%A0%E6%B3%95%E5%AF%B9%E8%A1%8C%E9%80%89%E6%8B%A9%E8%BF%9B%E8%A1%8C%E7%BC%96%E7%A8%8B%E7%9A%84%E8%AF%AD%E6%B3%95%E4%B8%8D%E5%90%88%E9%80%82%E7%9A%84%E5%9C%B0%E6%96%B9%E5%90%97%EF%BC%9F%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Elamstationfile%3DPick%20File(%22choose%20file%22%2C%22%24Documents%22%20)%3B%0Adt%3DOpen(lamstationfile%2C%0AImport%20Settings(End%20Of%20Field(%20Tab%20)%2CScan%20Whole%20File(%201%20)%2C%20Column%20Names%20Start(7%20)%2CData%20Starts(%208)%2C))%3B%0Adt%20%3D%20Current%20Data%20Table()%3B%0A%0A%2F%2Ffind%20data%20rows%0Aw%3DNRow(dt)%3B%0Adt%26lt%3B%3CSELECT%20where%3D%22%22%3E(d-1))%3B%0Adt2%3Ddt%26lt%3B%3CSUBSET%3E(d-1))%26lt%3B%3CDELETE%20rows%3D%22%22%3E%3C%2FDELETE%3E%3C%2FSUBSET%3E%3C%2FSELECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46639%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46639%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E6%82%A8%E9%99%84%E5%8A%A0%E7%9A%84%E6%95%B0%E6%8D%AE%E6%98%AF%E4%B8%80%E4%B8%AA%E6%96%87%E4%BB%B6%EF%BC%8C%E6%88%91%E6%97%A0%E6%B3%95%E6%89%93%E5%BC%80%E3%80%82%3CBR%20%2F%3E%E6%82%A8%E8%83%BD%E5%90%A6%E5%8F%AA%E6%8F%90%E4%BE%9B%E6%82%A8%E5%B0%9D%E8%AF%95%E4%BD%BF%E7%94%A8%E7%9A%84%E8%A1%A8%E6%A0%BC%E7%9A%84%E4%B8%80%E5%B0%8F%E9%83%A8%E5%88%86%EF%BC%9F%3CBR%20%2F%3E%E6%88%91%E8%83%BD%E6%83%B3%E5%88%B0%E4%B8%BA%E4%BB%80%E4%B9%88%E6%82%A8%E7%9A%84%E8%A1%8C%E9%80%89%E6%8B%A9%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%E7%9A%84%E5%8E%9F%E5%9B%A0%E4%B9%8B%E4%B8%80%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E9%99%A4%E4%BA%86%E6%8F%90%E4%BE%9B%E6%A0%B7%E6%9C%AC%E6%95%B0%E6%8D%AE%E9%9B%86%EF%BC%8C%E4%BD%A0%E8%83%BD%E8%AF%95%E8%AF%95%E8%BF%99%E4%B8%AA%E5%90%97%EF%BC%9F%3CBR%20%2F%3E%20dt%20%3D%20%E5%BD%93%E5%89%8D%E6%95%B0%E6%8D%AE%E8%A1%A8()%3B%3CBR%20%2F%3E%E7%84%B6%E5%90%8E%E8%BF%90%E8%A1%8C%E6%82%A8%E7%9A%84%E9%80%89%E6%8B%A9%EF%BC%8C%E5%85%B6%E4%B8%AD%20dt%20%E6%98%AF%E6%82%A8%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E7%9A%84%E6%95%B0%E6%8D%AE%E8%A1%A8%E3%80%82%3CBR%20%2F%3E%E5%A6%82%E6%9E%9C%20JMP%20%E6%97%A0%E6%B3%95%E8%AF%86%E5%88%AB%E6%88%96%E4%B8%A2%E5%A4%B1%E4%BA%86%E6%95%B0%E6%8D%AE%E8%A1%A8%E7%9A%84%E5%BC%95%E7%94%A8%EF%BC%8C%E9%82%A3%E4%B9%88%E6%97%A0%E8%AE%BA%E6%82%A8%E9%87%87%E7%94%A8%E4%BD%95%E7%A7%8D%E6%96%B9%E6%B3%95%EF%BC%8C%E8%A1%8C%E9%80%89%E6%8B%A9%E6%93%8D%E4%BD%9C%E9%83%BD%E5%B0%86%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%E3%80%82%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46637%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46637%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E6%84%9F%E8%B0%A2%E6%82%A8%E7%9A%84%E7%AD%94%E5%A4%8D%E3%80%82%20%E6%88%91%E8%AE%A4%E4%B8%BA%E9%94%99%E5%AD%97%E5%8F%AA%E5%8F%91%E7%94%9F%E5%9C%A8%E6%88%91%E5%B0%86%E4%BB%A3%E7%A0%81%E8%BD%AC%E7%A7%BB%E5%88%B0%E5%9C%A8%E7%BA%BF%E8%AE%A8%E8%AE%BA%E6%97%B6%E3%80%82%20%E6%88%91%E7%9A%84%E7%94%B5%E8%84%91%E4%B8%8A%E6%B2%A1%E6%9C%89%E6%89%93%E5%AD%97%E9%94%99%E8%AF%AF%EF%BC%8C%E5%90%A6%E5%88%99%E6%88%91%E4%BC%9A%E5%BE%97%E5%88%B0%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%90%8C%E7%9A%84%E9%94%99%E8%AF%AF%E3%80%82%20%E5%8F%A6%E5%A4%96%EF%BC%8C%E6%96%B9%E6%B3%95%231%E3%80%81%233%20%E5%92%8C%234%20%E5%AF%B9%E6%88%91%E4%B9%9F%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%E3%80%82%20%E4%B8%8D%E7%9F%A5%E9%81%93%E4%B8%BA%E4%BB%80%E4%B9%88%E3%80%82%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6696%22%20target%3D%22_blank%22%3E%40uday_guntupalli%3C%2FA%3E%E5%86%99%E9%81%93%EF%BC%9A%3CBR%20%2F%3E%20dt3%20%26lt%3B%3CSELECT%20where%3D%22%22%3E%3C%2FSELECT%3E%3C%2FBLOCKQUOTE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46610%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46610%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%88%91%E4%BB%A5%E4%B8%BA%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6696%22%20target%3D%22_blank%22%3E%40uday_guntupalli%3C%2FA%3E%E4%BB%A3%E7%A0%81%E5%BA%94%E8%AF%A5%E5%8F%AF%E4%BB%A5%E5%B7%A5%E4%BD%9C%EF%BC%8C%E4%BD%86%E6%98%AF%E5%9C%A8%2013.2.1%20%E4%B8%AD%E5%AE%83%E4%B8%8D%E4%BC%9A%EF%BC%88%E5%A5%87%E6%80%AA%EF%BC%89%E3%80%82%E4%BD%86%E6%98%AF%EF%BC%8C%E4%BD%BF%E7%94%A8%20As%20Column()%20%E8%80%8C%E4%B8%8D%E6%98%AF%20Column()%20%E5%85%81%E8%AE%B8%E6%82%A8%E7%9A%84%E7%89%B9%E5%AE%9A%E4%BB%A3%E7%A0%81%E5%B7%A5%E4%BD%9C%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt3%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0Alogis%20%3D%20%2255%22%3B%0Aclos%20%3D%20%22Height%22%3B%0Adt3%20%26lt%3B%26lt%3B%20Select%20Where(%20As%20Column(%20dt3%2C%20clos%20)%20%3D%3D%20Num(%20logis%20)%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46609%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46609%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3Edt3%20%26lt%3B%3CSELECT%20where%3D%22%22%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46608%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46608%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%AF%B9%E4%B8%8D%E8%B5%B7%EF%BC%8C%E6%88%91%E5%BA%94%E8%AF%A5%E6%9B%B4%E6%B8%85%E6%A5%9A%E3%80%82%E6%88%91%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E6%98%AF%E5%9C%A8%E6%88%91%E5%88%9B%E5%BB%BA%E4%BA%86%E7%AC%AC%E4%B8%89%E4%B8%AA%E6%95%B0%E6%8D%AE%E8%A1%A8%20dt3%20%E4%B9%8B%E5%90%8E%E6%88%91%E7%9A%84%E4%BB%A3%E7%A0%81%E7%BB%93%E6%9D%9F%E4%BA%86%E3%80%82%E6%9C%80%E5%90%8E%E4%B8%80%E8%A1%8C%E4%BB%A3%E7%A0%81%E4%B9%8B%E5%89%8D%E7%9A%84%E6%89%80%E6%9C%89%E5%86%85%E5%AE%B9%E9%83%BD%E5%B7%A5%E4%BD%9C%E6%AD%A3%E5%B8%B8%5B%E5%9C%A8%E7%AC%AC%E4%B8%80%E4%B8%AA%E6%95%B0%E6%8D%AE%E8%A1%A8%20dt%20%E4%B8%AD%E8%8E%B7%E5%8F%96%E8%A1%8C%E5%92%8C%E5%88%97%EF%BC%8C%E8%AE%BE%E7%BD%AE%E8%BE%93%E5%85%A5%20PM%23%3D2%20%E5%92%8C%20Logistic%23%3D1%20%E9%83%BD%E5%BE%88%E5%A5%BD%5D%E3%80%82%E6%88%91%E5%8F%AA%E6%98%AF%E6%97%A0%E6%B3%95%E5%9C%A8%20Logistic%23%20%3D1%20%E7%9A%84%20dt3%20%E4%B8%AD%E9%80%89%E6%8B%A9%E5%87%A0%E8%A1%8C%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%88%91%E5%B7%B2%E7%BB%8F%E5%B0%9D%E8%AF%95%E4%BA%86%E4%B8%8B%E9%9D%A2%E4%BB%A3%E7%A0%81%E6%91%98%E5%BD%95%E4%B8%AD%E6%8F%90%E5%88%B0%E7%9A%84%E5%87%A0%E7%A7%8D%E4%B8%8D%E5%90%8C%E6%96%B9%E6%B3%95%EF%BC%8C%E4%BD%86%E6%88%91%E7%9A%84%E4%BB%A3%E7%A0%81%E8%A6%81%E4%B9%88%E4%BB%A5%E2%80%9CScriptable%5B%5D%E2%80%9D%E6%B3%A8%E9%87%8A%E7%BB%88%E6%AD%A2%EF%BC%8C%E8%A6%81%E4%B9%88%E5%87%BA%E7%8E%B0%E2%80%9CSend%20expects%20scriptable%20object%E2%80%9D%E9%94%99%E8%AF%AF%E3%80%82%E6%88%91%E4%B8%8D%E7%A1%AE%E5%AE%9A%E4%B8%8B%E9%9D%A2%E7%9A%84%E4%BB%A3%E7%A0%81%E5%9C%A8%E5%93%AA%E9%87%8C%E9%98%BB%E6%AD%A2%E5%AE%83%E6%AD%A3%E5%B8%B8%E8%BF%90%E8%A1%8C%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22%20language-jsl%22%3E%3CCODE%20class%3D%22%20%20language-jsl%22%3E%3CSPAN%20class%3D%22token%20comment%22%3E%2F%2Fdt3%26lt%3B%3CGET%20rows%3D%22%22%20where%3D%22%22%3E%0A%20%0Adt3%3CSPAN%20class%3D%22token%20operator%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20operator%22%3E%26lt%3B%3C%2FSPAN%3ESelet%20Where%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%3A%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3EColumn%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20dt3%3CSPAN%20class%3D%22token%20punctuation%22%3E%2C%3C%2FSPAN%3E%20clos%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20operator%22%3E%3D%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ENum%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20logis%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%3B%3C%2FSPAN%3E%20%20%20%3CSPAN%20class%3D%22token%20comment%22%3E%2F%2FMethod%232%3C%2FSPAN%3E%0A%20%0A%3CSPAN%20class%3D%22token%20comment%22%3E%2F%2FFor(i%3D1%2C%20i%3DNRows(dt3)%2C%20i%2B%2B%2C%20%20%20%20%2F%2FMethod%233%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22token%20comment%22%3E%2F%2FIf(%20Column(%20dt3%2C%20clos%20)%5Bi%5D%20%3D%3D%20Num(%20logis%20)%2C%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22token%20comment%22%3E%2F%2F%20Column(%20dt3%2C%20clos%20)%5Bi%5D%20%26lt%3B%26lt%3B%20Set%20Selected(%201%20))%3B%20%20)%3B%3C%2FSPAN%3E%0A%20%0A%20%0A%3CSPAN%20class%3D%22token%20comment%22%3E%2F%2FFor%20Each%20Row(If(%20%3AColumn(%20dt3%2C%20clos%20)%20%3D%3D%20Num(%20logis%20)%2C%20%3AColumn(%20dt3%2C%20clos%20)%20%26lt%3B%26lt%3B%20Set%20%2F%2FSelected(1))%3B%20%20%2F%2FMethod%234%3C%2FSPAN%3E%3C%2FGET%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46558%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46558%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E6%B6%B5%E7%9B%96%E6%95%B0%E6%8D%AE%E8%A1%A8%E4%B8%AD%E7%AC%AC%E4%B8%80%E4%B8%AA%E9%97%AE%E9%A2%98%E7%9A%84%E8%84%9A%E6%9C%AC%EF%BC%8C%E5%9C%A8%E6%89%BE%E5%88%B0%E2%80%9CNUM_DATA_ROWS%EF%BC%9A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Elamstationfile%20%3D%20Pick%20File(%20%22choose%20file%22%2C%20%22%24Documents%22%20)%3B%0Adt%20%3D%20Open(%20lamstationfile%2C%20Import%20Settings(%20End%20Of%20Field(%20Tab%20)%2C%20%0AScan%20Whole%20File(%201%20)%2C%20Column%20Names%20Start(%207%20)%2C%20Data%20Starts(%208%20)%2C%20)%20)%3B%0Adt%20%3D%20Current%20Data%20Table()%3B%0A%0A%2F%2Ffind%20data%20rows%0Aw%20%3D%20N%20Row(%20dt%20)%3B%0Adt%20%26lt%3B%26lt%3B%20Select%20Where(%20%3ATime%20%3D%3D%20%22NUM_DATA_ROWS%22%20)%20%26lt%3B%26lt%3B%20Label(%201%20)%3B%0Ad%20%3D%20dt%20%26lt%3B%26lt%3B%20Get%20Selected%20Rows%3B%0AShow(%20d%20)%3B%0A%2F%2F%20A%20matrix%20is%20returned%20from%20%26lt%3B%26lt%3B%20Get%20Selected%20Rows%2C%20so%20you%20need%20to%20reference%20d%5B1%5D%0Adt%20%26lt%3B%26lt%3B%20Select%20Where(%20Row()%20%26gt%3B%20(d%5B1%5D%20-%201)%20)%3B%0Adt2%20%3D%20dt%20%26lt%3B%26lt%3B%20Subset(%20Selected%20Rows(%201%20)%2C%20Selected%20columns%20only(%200%20)%20)%3B%0Adt%20%2F*%26lt%3B%26lt%3B%20Select%20Where(%20Row()%20%26gt%3B%20(d%20-%201)%20)*%2F%20%26lt%3B%26lt%3B%20Delete%20Rows%3B%0A%2F%2F%20Change%20first%20two%20columns%20to%20numeric%20data%0AColumn(%20dt%2C%201%20)%20%26lt%3B%26lt%3B%20Data%20Type(%20Numeric%20)%3B%0AColumn(%20dt%2C%201%20)%20%26lt%3B%26lt%3B%20Modeling%20Type(%20%22Continuous%22%20)%3B%0AColumn(%20dt%2C%201%20)%20%26lt%3B%26lt%3B%20format(%22hr%3Am%3As%22)%3B%0AColumn(%20dt%2C%202%20)%20%26lt%3B%26lt%3B%20Data%20Type(%20Numeric%20)%3B%0AColumn(%20dt%2C%202%20)%20%26lt%3B%26lt%3B%20Modeling%20Type(%20%22Continuous%22%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E5%85%B3%E4%BA%8E%E6%82%A8%E9%80%89%E6%8B%A9%E5%88%97%E7%84%B6%E5%90%8E%E8%BF%9B%E8%A1%8C%E5%AD%90%E9%9B%86%E5%8C%96%EF%BC%8C%E6%88%91%E5%BB%BA%E8%AE%AE%E6%82%A8%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%AE%E7%9A%84%E5%88%97%E9%80%89%E6%8B%A9%E5%B7%A5%E5%85%B7%E2%80%9CColumns%20Viewer%E2%80%9D%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E6%9E%84%E5%BB%BA%E6%82%A8%E8%87%AA%E5%B7%B1%E7%9A%84%E9%80%89%E6%8B%A9%E5%B7%A5%E5%85%B7%E3%80%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%26lt%3B%26lt%3B%20Columns%20Viewer%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46552%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46552%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%AF%B9%E4%B8%8D%E8%B5%B7%E3%80%82%E6%95%B0%E6%8D%AE%E7%8E%B0%E5%9C%A8%E5%B7%B2%E6%AD%A3%E7%A1%AE%E9%99%84%E5%8A%A0%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46547%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Scriptable%5B%5D%20or%20'send%20expects%20scriptable%20object'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46547%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F10002%22%20target%3D%22_blank%22%3E%40asdf%3C%2FA%3E%20%3A%3CBR%20%2F%3E%E9%99%84%E4%BB%B6%20(.zip)%20%E6%96%87%E4%BB%B6%E4%B8%BA%E7%A9%BA%20-%20%E5%9B%A0%E6%AD%A4%E6%9C%AA%E6%8F%90%E4%BE%9B%E6%82%A8%E7%9A%84%E6%95%B0%E6%8D%AE%E6%9D%A5%E6%B5%8B%E8%AF%95%E6%82%A8%E7%9A%84%E4%BB%A3%E7%A0%81%E5%B9%B6%E6%9F%A5%E7%9C%8B%E9%94%99%E8%AF%AF%E4%BB%A5%E8%BF%9B%E8%A1%8C%E6%95%85%E9%9A%9C%E6%8E%92%E9%99%A4%E3%80%82%3CBR%20%2F%3E%E5%9C%A8%E6%B2%A1%E6%9C%89%E6%82%A8%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E7%9A%84%E5%AE%9E%E9%99%85%E6%95%B0%E6%8D%AE%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E8%AE%A9%E6%88%91%E4%BB%AC%E7%9C%8B%E4%B8%80%E4%B8%8B%E8%BF%99%E4%B8%AA%E4%BE%8B%E5%AD%90%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FAir%20Traffic.jmp%22%20)%3B%0A%0Adt%20%26lt%3B%26lt%3B%20Select%20Where(%3AAirline%20%3D%3D%20%22Delta%22%20%26amp%3B%20%3AEvent%20%3D%3D%20%22Arrive%22)%3B%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E5%A6%82%E6%82%A8%E6%89%80%E8%A7%81%20-%20%E6%82%A8%E5%8F%AF%E4%BB%A5%E9%80%89%E6%8B%A9%E6%BB%A1%E8%B6%B3%E4%B8%A4%E4%B8%AA%E4%B8%8D%E5%90%8C%E5%88%97%E7%9A%84%E4%B8%A4%E4%B8%AA%E4%B8%8D%E5%90%8C%E6%9D%A1%E4%BB%B6%E7%9A%84%E8%A1%8C%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E5%9C%A8%E4%BD%A0%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%20-%20%E5%A6%82%E6%9E%9C%3CSPAN%3EPM%23%3D2%20%E5%92%8C%20Logistic%23%3D1%20%E6%8C%87%E7%9A%84%E6%98%AF%202%20%E4%B8%AA%E4%B8%8D%E5%90%8C%E7%9A%84%E8%A1%A8%20-%20%E7%84%B6%E5%90%8E%E6%82%A8%E9%9C%80%E8%A6%81%E6%A0%B9%E6%8D%AE%E6%82%A8%E6%89%80%E8%BF%BD%E6%B1%82%E7%9A%84%E5%85%AC%E5%85%B1%E5%88%97%E8%BF%9E%E6%8E%A5%E8%BF%99%E4%BA%9B%E8%A1%A8%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E5%A6%82%E6%9E%9C%E4%B8%A4%E8%80%85%E9%83%BD%E4%B8%8D%E6%98%AF%EF%BC%8C%E8%AF%B7%E6%8F%90%E4%BE%9B%E5%AE%9E%E9%99%85%E6%A0%B7%E6%9C%AC%E6%95%B0%E6%8D%AE%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FSELECT%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
asdf
Level I

Scriptable[] or 'send expects scriptable object'

Hi,

I've tried many methods of trying to select specific rows with PM#=2 and  Logistic#=1 in my pre-filtered table, but I either get a 'Send expects scriptable object' message, a 'Scriptable[]' and then script termination, or an endless loop.  Can someone please help with what is inappropriate with the syntax that I cannot program the row selection?  Thanks!

 

 

lamstationfile=Pick File("choose file","$Documents" );
dt=Open(lamstationfile,
Import Settings(End Of Field( Tab ),Scan Whole File( 1 ), Column Names Start(7 ),Data Starts( 8),));
dt = Current Data Table();

//find data rows
w=NRow(dt);
dt<<Select Where(:Time=="NUM_DATA_ROWS")<<Label(1);
d=dt<<Get Selected Rows;
Show(d);
dt<<Select Where(Row()>(d-1));
dt2=dt<<Subset( Selected Rows(1), Selected columns only(0));
dt<<Select Where(Row()>(d-1))<<Delete Rows;
// Change first two columns to numeric data
Column(dt,1)<< Data Type (Numeric); Column(dt,1)<<Modeling Type("Continuous");
Column(dt,2)<< Data Type (Numeric); Column(dt,2)<<Modeling Type("Continuous");
 

nw= New Window( "What PM?",<<Modal,<<Bring Window To Front,
V List Box( Text Box( "PM#"), pm_in = Text Edit Box("PM#", <<Justify Text (Center)), Spacer Box(Size(25,25))),
H List Box( Button Box("OK", pm= pm_in << Get Text();), Button Box("Cancel", nw<<Close Window)));
nw= New Window( "What Logistic?",<<Modal,<<Bring Window To Front,
V List Box( Text Box( "Logistic#"), wafer_in =Text Edit Box("Logistic#"), Spacer Box(Size(25,25))),
H List Box( Button Box("OK", logis= wafer_in << Get Text();), Button Box("Cancel", nw<<Close Window)));
//take out uneccessary PM data
Show("PM"|| pm);
ColNames = dt << Get Column Names();
colstrings = char(colnames);
match = regex(colstrings, "PM"|| pm);
//Show(colstrings);
found_list={};
close(dt2,no save);
//how can I have it with 2 dt open?
for (i = 1, i <= nitems(ColNames), i++,
if (contains(ColNames[i], match),
ColNames[i]<<Set Selected(1)
//insertinto(found_list, ColNames[i]);
);
);
Column(dt,1)<<Set Selected(1);
//For found_list<<Set Selected(1);
//Show(found_list);
dt3=dt<<Subset( Selected Rows(0), Selected columns only(1));

Num(logis);
Show(logis);
//Logistics column is the last in the table
clos=NCol(dt3);
Show(clos);
Show( Column( dt3, clos )[2] );
 
//dt3<<Get Rows Where(:Column(clos)==logis);  //Method #1
 
dt3<<Selet Where(:Column( dt3, clos ) == Num( logis ));   //Method#2
 
//For(i=1, i=NRows(dt3), i++,    //Method#3
//If( Column( dt3, clos )[i] == Num( logis ),
// Column( dt3, clos )[i] << Set Selected( 1 ));  );
 
 
//For Each Row(If( :Column( dt3, clos ) == Num( logis ), :Column( dt3, clos ) << Set //Selected(1));  //Method#4

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Scriptable[] or 'send expects scriptable object'

I thought that @uday_guntupalli code should work, however in 13.2.1 it would not(strange).  However, using As Column() instead of Column() allowed your specific code to work

Names Default To Here( 1 );
dt3 = Open( "$SAMPLE_DATA/Big Class.jmp" );
logis = "55";
clos = "Height";
dt3 << Select Where( As Column( dt3, clos ) == Num( logis ) );
Jim

View solution in original post

8 REPLIES 8
uday_guntupalli
Level VIII

Re: Scriptable[] or 'send expects scriptable object'

@asdf : 
    Attachment (.zip) file is empty - so your data was not provided to test your code and see you error to troubleshoot . 
   In the absence of the actual data you are working with - here lets look at this example . 

dt = Open( "$SAMPLE_DATA/Air Traffic.jmp" );

dt << Select Where(:Airline == "Delta" & :Event == "Arrive"); 

  As you can see - you can select rows where two different conditions on two different columns are being met. 

  In your case - if the PM#=2 and  Logistic#=1 refer to 2 different tables - then you need to join the tables based on common columns for what you are after. 

  If its not either - please provide actual sample data .

Best
Uday
asdf
Level I

Re: Scriptable[] or 'send expects scriptable object'

Sorry.  The data is now appropriately attached.

txnelson
Super User

Re: Scriptable[] or 'send expects scriptable object'

Here is a script that covers the first issue in your data table, selecting row after finding "NUM_DATA_ROWS:

lamstationfile = Pick File( "choose file", "$Documents" );
dt = Open( lamstationfile, Import Settings( End Of Field( Tab ), 
Scan Whole File( 1 ), Column Names Start( 7 ), Data Starts( 8 ), ) );
dt = Current Data Table();

//find data rows
w = N Row( dt );
dt << Select Where( :Time == "NUM_DATA_ROWS" ) << Label( 1 );
d = dt << Get Selected Rows;
Show( d );
// A matrix is returned from << Get Selected Rows, so you need to reference d[1]
dt << Select Where( Row() > (d[1] - 1) );
dt2 = dt << Subset( Selected Rows( 1 ), Selected columns only( 0 ) );
dt /*<< Select Where( Row() > (d - 1) )*/ << Delete Rows;
// Change first two columns to numeric data
Column( dt, 1 ) << Data Type( Numeric );
Column( dt, 1 ) << Modeling Type( "Continuous" );
Column( dt, 1 ) << format("hr:m:s");
Column( dt, 2 ) << Data Type( Numeric );
Column( dt, 2 ) << Modeling Type( "Continuous" );

Concerning your selection of columns and then subsetting, I would suggest that you use the builtin column selection tool, "Columns Viewer" rather than building your own selection tool.

dt << Columns Viewer;
Jim
asdf
Level I

Re: Scriptable[] or 'send expects scriptable object'

Sorry, I should have been more clear.  The problem I am having is with the end of my code after I've created a third data table dt3.  Everything before the last active line of code works fine [getting rows and columns in first data table dt, setting the inputs PM#=2 and Logistic#=1 are fine ].  I just cannot select several rows in dt3 where Logistic# =1 . 

 

I've tried several different methods as noted in the code excerpt below, but I either get code terminated with 'Scriptable[]' note or 'Send expects scriptable object' error.  I'm not sure where in the below code is preventing it from running appropriately.

  

 

 

//dt3<<Get Rows Where(:Column(clos)==logis);  //Method #1
 
dt3<<Selet Where(:Column( dt3, clos ) == Num( logis ));   //Method#2
 
//For(i=1, i=NRows(dt3), i++,    //Method#3
//If( Column( dt3, clos )[i] == Num( logis ),
// Column( dt3, clos )[i] << Set Selected( 1 ));  );
 
 
//For Each Row(If( :Column( dt3, clos ) == Num( logis ), :Column( dt3, clos ) << Set //Selected(1));  //Method#4

 

uday_guntupalli
Level VIII

Re: Scriptable[] or 'send expects scriptable object'

dt3 <<Select Where(:Column( dt3, clos ) == Num( logis )); // There is a typo to start with
Best
Uday
txnelson
Super User

Re: Scriptable[] or 'send expects scriptable object'

I thought that @uday_guntupalli code should work, however in 13.2.1 it would not(strange).  However, using As Column() instead of Column() allowed your specific code to work

Names Default To Here( 1 );
dt3 = Open( "$SAMPLE_DATA/Big Class.jmp" );
logis = "55";
clos = "Height";
dt3 << Select Where( As Column( dt3, clos ) == Num( logis ) );
Jim
asdf
Level I

Re: Scriptable[] or 'send expects scriptable object'

Thank you for your response. I think that typo only happened when I was transferring the code to the Online Discussion. There wasn't a typo on my computer, otherwise I would have gotten a different error. Also, Method#1, #3, and #4 didn't work for me either. Not sure why.

@uday_guntupalli wrote:
dt3 <<Select Where(:Column( dt3, clos ) == Num( logis ));
uday_guntupalli
Level VIII

Re: Scriptable[] or 'send expects scriptable object'

The data that you attached is a file , I am unable to open .
Can you just provide a small subset of the table you are trying to work with ?
One reason I can think of as to why your row selection doesn't work .

Besides providing sample data set , can you try this ?
dt = Current Data Table();
And then run your selection where dt is the data table you are working with .
If JMP doesn't recognize or has lost the reference of the data table , then irrespective of your approach - the row selection operation will not work .
Best
Uday

Recommended Articles