使用公式列設定可編輯行大家好,
我正在嘗試建立一個包含用戶限制的行和列的資料表。我有一個預設值列(該行中所有列值的預設值)我已將其編碼為其他列中的公式...但如果我有公式,我無法獲得用戶輸入...我需要靈活性用戶輸入資料
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 ) )
從 Formula() 到 Set Each Value()
Set Each Value( If( Is Empty( :Default Row State ), Empty(), :Default Row State ) )
並且該列將具有實際值而不是公式,因此允許編輯
回覆:使用公式列設定可編輯行@txnelson感謝您的回覆...但是設定每個 value() 不是動態的...
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, ., ., .] )
)
)