ユーザーの選択に基づくJSLの列の名前変更ユーザーが選択したファイルに基づいて列名の名前を変更しようとしています。 しかし、列の名前を変更するのに問題があります。 コードを追加しましたが、セット名の名前変更が機能しません。 私は何か間違ったことをしていると思います。 誰でもこれについて教えてもらえますか?
Clear Log();
dt1_dir = Pick Directory( "Select directory for data table 1" );
dt1_Name = Pick File( "Select data file 1", dt1_dir, {"JMP Files|jmp;jsl;jrn", "All Files|*"}, 1, 0, 0 );
Show( dt1_Name );
dt = Open( dt1_Name );
Show( dt );
dt<< bring window to front;
box = column dialog(
a=collist("BDATE", MAX col(1), min col(1),DataType ("Numeric")),
b=collist("SHIPDATE", MAX col(1), min col(1), DataType ("Numeric")),
c=collist("BUY Date", MAX col(1),min col(1), DataType ("Numeric")),
);
box["a"] << set name("build date")
box["b"] << set name("shipping date")
box["c"] << set name("buy date")分析データ表スクリプティングウィンドウズRe: ユーザーの選択に基づくJSLの列の名前変更やあ@shasha_2 、
あなたが何をしたいのか、Column Dialog() コマンドをどのように使用するつもりなのか、私には 100% 確信が持てませんが、以下のスクリプトはあなたが望むことを実行します。 また、新しいウィンドウにどのようなオプションがあるかなどに関して、より多くの柔軟性が得られます。ウィンドウをモーダルにしたい場合は、ここに <
Names Default To Here( 1 );
bwidth = 100;
dt = New Table("test",
Add Rows(3),
New Column("Col 1", Continuous),
New Column("Col 2", Continuous),
New Column("Col 3", Continuous)
);
dt << bring window to front;
box_win = New Window( "Select Columns",
H List Box(
Panel Box( "Select Columns", ColListData = Col List Box( dt, All, Grouped, width( bwidth ), nLines( 5 ) ) ),
V List Box(
Panel Box( "Case Selected Columns Into Roles",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "BDATE", colLista << Append( ColListData << Get Selected ) ),
ColLista = Col List Box( width( bwidth ), N Lines( 1 ), Max Items( 1 ), Min Items( 1 ), <<SET data="https://community.jmp.com/" type=""></SET>お役に立てれば、
DS
Re: ユーザーの選択に基づくJSLの列の名前変更box["a"]
JMP リストを返します。
{:NPN1}
文字列や式ではありません。したがって、リストから要素を適切に抽出し、それを列としてJSLに戻す必要があります
as column((box["a"])[1]) << Set Name( :build date" );
名前を変更するために必要な変更は次のとおりです。
as column((box["a"])[1]) << set name( "build date" );
as column((box["b"])[1]) << set name( "shipping date" );
as column((box["c"])[1]) << set name( "buy date" );