创建循环以将列属性添加到包含特定标题的列你好,
作为 JSL 的新手,我仍在努力实现某些概念(即循环)。
无论如何,我正在尝试创建一个脚本,该脚本将添加到表中的任何列,其中标题包含“Norm”许多特定的列属性。
dt=current data table();
a = "Norm";
col = dt << get column names( string );
nc = N Items( col );
For( i = 1, i <= nc, i++,
If( Contains( col[i], a ),
col[i]<<ADD column="" properties=""></ADD>
不幸的是,我显然错过了一些基本的东西,并且脚本不会去任何地方。一些指导将不胜感激。
谢谢
塞巴斯蒂安
回复:创建循环以将列属性添加到包含特定标题的列工作起来就像一个魅力。
非常感谢您非常迅速的建议。
非常感激回复:创建循环以将列属性添加到包含特定标题的列看看这是不是你想要的
Names Default To Here( 1 );
dt = Current Data Table();
a = "Norm";
col = dt << get column names( string );
nc = N Items( col );
For( i = 1, i <= nc, i++,
If( Contains( col[i], a ),show(col[i]);
column(col[i]) << Set Property( "Axis", Add Ref Line( 200, "Dotted", "Red", "", 2 ) )
)
);