连接/保存和评估公式当手动连接两个表时,有一个选项可以“保存和评估公式”,以便对新日期或附加日期中的公式进行评估。
在 JSL 中,此选项不可用,只有“保留公式”女巫会抑制评估。
dt_1 << Concatenate(dt_2,Append to first table,save and evaluate formulas(1)); // this is not possible
我知道你可以使用:
dt_1:mycol << Suppress Eval( 0 );
dt_1:mycol << Eval Formula(1);
要获得与手动选项相同的结果,但我必须使用公式搜索每一列并执行此操作。
是否有隐藏功能或计划将其作为选项包含在 Concatenate 中?
回复:连接/保存和评估公式我可以按照数据操作找到“问题”
我创建了一个现有数据表的子集并清除所有锁定公式列并抑制评估的数据。
然后用数据填充表格,但公式保持为空。
我连接多个相同的表(附加到第一个表)。 如果主表有一个被抑制的 eval,则 concat 表也不会被评估。
允许评估子集解决了问题。
dt_2 = dt << Subset(Output Table( "temp" ),Selected Rows( 0 ),Rows( [1] ),Selected columns only( 0 ),copy formula(1),link to original data table(0),Suppress formula evaluation( 0 ));
Concat dt_2 然后启用了公式评估。
回复:连接/保存和评估公式感谢您的快速回复,您的示例工作正常,我什至将列预设为“supress eval”并在 concat 之后对其进行评估。
所以我的表有一个公式,但它没有执行,并且在 concat 之后仍然被抑制。 我发现早些时候有人提到,表没有时间评估该列并且不知何故卡住了,这可能是一个时间问题。 我会进一步调查。
回复:连接/保存和评估公式据我所知,Keep Formulas 不会抑制评估。
试试这个脚本,看看中的公式行号在结果表中进行评估。
dt1 = New Table( "One Table",
Add Rows( 10 ),
New Column( "Row no",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Row() )
)
);
dt2 = New Table( "Another Table",
Add Rows( 10 ),
New Column( "Row no",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Row() )
)
);
Data Table( "One Table" ) <<
Concatenate(
Data Table( "Another Table" ),
Keep Formulas,
Create source column
);
