SetTableFieldProperty Method
Sets the value of a table field process property.
public void SetTableFieldProperty(string name, Dictionary<string, List<string>> tableValues);
Classes: Properties
Parameters
string name
Name of the property to set.
Dictionary<string, List<string>> tableValues
Table values to set to the property.
Example
The following example demonstrates adding a row of data to a table field property. The table data is returned from the GetTableFieldValues method as a Dictionary<string, List<string>>. The key of the dictionary represents a column field's name, and the value of the dictionary represents the cells of data belonging to that column. The example table field property has two columns, and a new cell is inserted into each with values corresponding to the name of the column field.
var tableData = Process.Properties.GetTableFieldValues("Table Field");
var cellOneValue = "100";
var cellTwoValue = "200";
foreach (var column in tableData)
{
switch (column.Key)
{
case "Cell One": // Column field is named "Cell One"
column.Value.Add(cellOneValue);
break;
case "Cell Two": // Column field is named "Cell Two"
column.Value.Add(cellTwoValue);
break;
}
}
Process.Properties.SetTableFieldProperty("Table Field", tableData);
Remarks
If no property can be found by the parameter "name", an InvalidOperationException will be thrown.
This method will execute successfully on property regardless if it is backed by a table field value field in the field catalog.