建立循環以將列屬性新增至包含特定標題的列你好,
作為 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 ) )
)
);