使用公式列设置可编辑行大家好,
我正在尝试创建一个具有用户限制行和列的数据表。我有一个默认值列(该行中所有列值的默认值),我已将其编码为其他列中的公式……但如果我有公式,我就无法让用户输入……我需要为用户输入数据提供灵活性
n = 10;
rownList = {};
For(i=1, i<=n, i++,
Insert Into(rownList, "Row " || Char(i));
);
dt = New Table("Restricted Row Value Table",
Add Rows(n),
New Column( "Row Number",Character,"Nominal",Set Values(rownList),Color Cells( {77, {0}} ))
);
dt << New Column("Default Row State","Nominal",Color Cells( {-14803425, {0}} ));
For(i=1, i<=n, i++,
dt << New Column("Column " || Char(i),"Nominal",
Formula( If( Is Empty( :Default Row State ), Empty(), :Default Row State ) )
);
);
dt << Set Edit Lock( "Add Rows", "Add Columns", "Delete Columns" );我如何重写公式以使其允许用户输入但如果指定则采用默认值...请指导...提前致谢
自动化和脚本回复:使用公式列设置可编辑行改变
Formula( If( Is Empty( :Default Row State ), Empty(), :Default Row State ) )
从公式() 到设置每个值()
Set Each Value( If( Is Empty( :Default Row State ), Empty(), :Default Row State ) )
并且该列将具有实际值而不是公式,从而允许编辑
回复:使用公式列设置可编辑行@txnelson谢谢回复...但是设置每个值()不是动态的......
Formula( If( Is Empty( :Default Row State ), Empty(), :Default Row State ) )
当用户在“默认行值”中输入数据时,它会应用于所有其他数据,但不允许用户在该列输入任何数据,
Set Each Value( If( Is Empty( :Default Row State ), Empty(), :Default Row State ) )
仅在第一次执行时适用...
有没有什么方法可以让公式适应用户输入?
回复:使用公式列设置可编辑行这种方法可能对您有用。使用隐藏列,该列具有设置不同列中值的公式。设置了值的列仍然可编辑,因为它不包含列公式。

New Table( "Examplel",
Add Rows( 10 ),
New Column( "Default Row State",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [., 3, ., ., 44, ., 8, ., ., .] )
),
New Column( "formula column",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
If( Is Empty( :Default Row State ) & :Default Row State != :Formula Column,
:Output Column[Row()] = .,
:Output Column[Row()] = :Default Row State
);
:Formula Column = :Default Row State;
),
Hide
),
New Column( "Output Column",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [., 3, ., ., 888, ., 8, ., ., .] )
)
)