按索引列你好!
按索引引用列的正確方法是什麼? 理想情況下,我正在尋找這樣的東西:

先感謝您!
消費者與市場研究回覆:按索引列謝謝布雷迪,這正是我一直在尋找的。 多謝!
回覆:按索引列啊... 我現在明白你想要什麼了。
嘗試將此作為您的公式。 它使用格式 column(dt, n)[row()] 來取得資料表第 n 列目前行的值,其中 n 的值是您在資料表目前行中放置的值:區塊列。
Column( :Block << get data table, :Block )[Row()]
乾杯,
布雷迪
回覆:按索引列不確定您想從列中取得什麼資料。 區塊列是否定義了要從中取得資料的儲存格的列和行?
Column(:Block)[:Block]

回覆:按索引列謝謝jthi,我覺得「<< get name」讓我們向前邁出了一步。 我的最終目標是基本上進行 HLOOKUP,這是一個演示。 目前它提取列名稱,而我希望它查看該列的資料。

如果需要的話,這是完整的程式碼:
New Table( "Untitled",
Add Rows( 3 ),
Compress File When Saved( 1 ),
New Column( "Column 1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [11, 111, 1111] )),
New Column( "Column 2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [22, 222, 2222] )),
New Column( "Column 3",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [33, 333, 3333] )
),
New Column( "Block",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 3] )
),
New Column( "Formula",
Character,
"Nominal",
Formula(
Choose( :Block,
Column( 1 ) << get name,
Column( 2 ) << get name,
Column( 3 ) << get name))))
回覆:按索引列嘗試使用 << get name 而不是 Column Name()
Choose(:Block,
Column(1) << get name,
Column(2) << get name,
Column(3) << get name
)

完整範例:
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(3),
Compress File When Saved(1),
New Column("Block", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3])),
New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([1, ., .])),
New Column("Column 3", Numeric, "Continuous", Format("Best", 12), Set Values([2, ., .])),
New Column("Column 4", Numeric, "Continuous", Format("Best", 12), Set Values([3, ., .])),
New Column("Formula",
Character,
"Nominal",
Formula(Choose(:Block, Column(1) << get name, Column(2) << get name, Column(3) << get name))
)
);回覆:按索引列對於腳本來說可能是這樣,但在公式中我收到此錯誤:

有趣的是,彈出視窗建議可以提供號碼,但事實似乎並非如此

回覆:按索引列您應該能夠僅使用列(索引)。
向資料列物件發送訊息
col = Column( 2 ); // assign a reference to the second column