IWbs.SetFreeFieldValues Method
Parameters
- columnMnemonic
- string
The unique identifier (mnemonic) of the WBS column. It must be a free column.
- hexIDsAndValues
- IDictionary<string, object>
The values of the WBS field to be set. A dictionary whose keys are the 24 characters long hexadecimal unique identifiers of the tasks; and values are the values to be written (either text or numbers according to the field type).
- clearMissing
- bool
Indicates whether to clear the cells in rows for which the values are missing in the hexIDsAndValues.
- writeToBranches
- bool
Indicates whether the values should be set/cleared in the top of branches, if the field has 'Show in totals' set to 'Nothing'. So it only applies if IWbsField.ShowInTotals is FieldShowInTotalsKind.Nothing. If this parameter is set to true, then the values can be written to the top of branches; otherwise, not.
- writeToTotals
- bool
Indicates whether the values should be set/cleared in total rows at the bottom of branches, if the field has 'Show in totals' set to 'Nothing'. So it only applies if IWbsField.ShowInTotals is FieldShowInTotalsKind.Nothing. If this parameter is set to true, then the values can be written to the total rows at the bottom of branches; otherwise, not.
Exception type | Condition |
---|---|
A problem occurred. |
This function works only for the current opened estimate. You cannot write to WBS of a foreign estimate.
The function requires no check-and-repaint because it writes to the workbook and the database at once.
You can only write to free columns with this function. Columns set to text will allow texts only, columns set to numeric will allow numbers only and columns set to any will allow both.
You cannot set blob values, i.e. embedded files, with this method. If you want to set the values of the fields that have their IWbsField.DataType set to WbsFieldDataType.AnyFile, such as "_Document" or "_Workbook", you need to call ITask.StoreBlob method.