ExtendedAttributeDefinition Class |
Namespace: Aspose.Tasks
The ExtendedAttributeDefinition type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Alias |
Gets or sets the alias of a custom field.
|
![]() ![]() | AppendNewValues |
Gets or sets a value indicating whether new values added to a project are automatically added to the list.
|
![]() ![]() | AutoRollDown |
Gets or sets a value indicating whether an automatic roll down to assignments is enabled.
|
![]() ![]() | CalculationType |
Gets or sets the calculation type.
|
![]() ![]() | CfType |
Gets the type of a custom field.
|
![]() ![]() | Default |
Gets or sets the default value in the list.
|
![]() ![]() | DefaultGuid |
Gets or sets the Guid of the default lookup table entry.
|
![]() ![]() | ElementType |
Gets or sets the extended attribute is associated
with a task, a resource or an assignment.
|
![]() ![]() | FieldId |
Gets or sets corresponds to the project id of a custom field.
Use string representation of a constant from ExtendedAttributeTask class to specify FieldId property.
|
![]() ![]() | FieldName |
Gets the name of a custom field.
|
![]() ![]() | Formula |
Gets or sets the formula that Microsoft Project uses to populate a custom task field.
|
![]() ![]() | Guid |
Gets or sets the Guid of a custom field.
|
![]() ![]() | LookupUid |
Gets a Guid of the lookup table associated with a custom field.
|
![]() ![]() | MaxMultiValues |
Gets or sets the maximum number of values you can set in a pick list.
|
![]() ![]() | ParentProject |
Gets the parent project for the ExtendedAttributeDefinition instance.
|
![]() ![]() | PhoneticsAlias |
Gets or sets the phonetic pronunciation of the alias of a custom field.
|
![]() ![]() | RestrictValues |
Gets or sets a value indicating whether the custom field values are restricted to values in the ValueList.
|
![]() ![]() | RollupType |
Gets or sets the way rollups are calculated.
|
![]() ![]() | SecondaryGuid |
Gets or sets the secondary guid of extended attribute.
|
![]() ![]() | SecondaryPid |
Gets or sets the secondary PID of a custom field.
|
![]() ![]() | UserDef |
Gets or sets a value indicating whether a custom field is user defined.
|
![]() ![]() | ValueList |
Gets the List<Value> ValueList.
|
![]() ![]() | ValuelistSortOrder |
Gets or sets the way value lists are sorted. Values are: 0=Descending, 1=Ascending.
|
Name | Description | |
---|---|---|
![]() ![]() | AddLookupValue |
Adds a value to the internal lookup list. This is a preferable way for manipulations with the ValueList.
|
![]() ![]() | CreateExtendedAttribute |
Creates a new extended attribute with the field ID which equals to this object's field ID value.
|
![]() ![]() | CreateExtendedAttribute(Boolean) |
Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified flag value.
|
![]() ![]() | CreateExtendedAttribute(DateTime) |
Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified date value.
|
![]() ![]() | CreateExtendedAttribute(Decimal) |
Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified numeric value.
|
![]() ![]() | CreateExtendedAttribute(String) |
Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified text value.
|
![]() ![]() | CreateExtendedAttribute(Duration) |
Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified duration value.
|
![]() ![]() | CreateExtendedAttribute(Value) |
Creates new extended attribute linked with specified Value item.
|
![]() ![]() ![]() | CreateLookupResourceDefinition(ExtendedAttributeResource, String) |
Factory method which creates an extended attribute definition with lookup.
It has CalculationType equals to Lookup and can be used in Resources only.
You are required to specify fieldId and alias when call this method.
The field type is inferred from field id.
|
![]() ![]() ![]() | CreateLookupResourceDefinition(CustomFieldType, ExtendedAttributeResource, String) |
Factory method which creates an extended attribute definition with lookup.
It has CalculationType equals to Lookup and can be used in Resources only.
You are required to specify customFieldType, fieldId and alias when call this method.
|
![]() ![]() ![]() | CreateLookupTaskDefinition(ExtendedAttributeTask, String) |
Factory method which creates an extended attribute definition with lookup.
It has CalculationType equals to Lookup and can be used in Tasks only.
You are required to specify fieldId and alias when call this method.
The field type is inferred from field id.
|
![]() ![]() ![]() | CreateLookupTaskDefinition(CustomFieldType, ExtendedAttributeTask, String) |
Factory method which creates an extended attribute definition with lookup.
It has CalculationType equals to Lookup and can be used in Tasks only.
You are required to specify customFieldType, fieldId and alias when call this method.
|
![]() ![]() ![]() | CreateResourceDefinition(ExtendedAttributeResource, String) |
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".
It has CalculationType equals to None and can be used in Resource only.
You are required to specify fieldId and alias when call this method.
The field type is inferred from field id.
|
![]() ![]() ![]() | CreateResourceDefinition(CustomFieldType, ExtendedAttributeResource, String) |
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".
It has CalculationType equals to None and can be used in Resource only.
You are required to specify customFieldType, fieldId and alias when call this method.
|
![]() ![]() ![]() | CreateTaskDefinition(ExtendedAttributeTask, String) |
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".
It has CalculationType equals to None and can be used in Tasks only.
You are required to specify fieldId and alias when calling this method.
The field type is inferred from field id.
|
![]() ![]() ![]() | CreateTaskDefinition(CustomFieldType, ExtendedAttributeTask, String) |
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".
It has CalculationType equals to None and can be used in Tasks only.
You are required to specify customFieldType, fieldId and alias when calling this method.
|
![]() ![]() | Equals |
Returns a flag indicating whether this instance is equal to the specified object.
(Overrides ObjectEquals(Object).) |
![]() | Finalize | (Inherited from Object.) |
![]() ![]() | GetHashCode |
Returns a hash code for the instance of the ExtendedAttributeDefinition class.
(Overrides ObjectGetHashCode.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() ![]() | RemoveLookupValue |
Removes a value from the internal lookup list. This is a preferable way for manipulations with the ValueList.
|
![]() | ToString | (Inherited from Object.) |
public static void EvaluateChoose() { var project = CreateTestProjectWithCustomField(); // Set Formula project.ExtendedAttributes[0].Formula = "Choose(3, \"This is a\", \"right\", \"choice\")"; // Print extended attribute value var task = project.RootTask.Children.GetById(1); Console.WriteLine(task.ExtendedAttributes[0].TextValue); } public static void EvaluateIsNumeric() { string[] numericFormulas = { "IsNumeric('AAA')", @"IsNUmeric(1)", "IsNumeric(1<0)", "IsNumeric(\"1.1\")", "IsNumeric(Choose((2 + Sgn(2^-3)), 123, \"one two three\"))" }; var project = CreateTestProjectWithCustomField(); foreach (var numericFormula in numericFormulas) { // Set Formula project.ExtendedAttributes[0].Formula = numericFormula; // Print extended attribute value var task = project.RootTask.Children.GetById(1); Console.WriteLine(task.ExtendedAttributes[0].TextValue); } } public static void EvaluateSwitch() { var project = CreateTestProjectWithCustomField(); // Set Formula project.ExtendedAttributes[0].Formula = "Switch( 0 < 1, \"0 is lesser than 1\", 0 > 1, \"0 is greater than 1\")"; // Print extended attribute value var task = project.RootTask.Children.GetById(1); Console.WriteLine(task.ExtendedAttributes[0].TextValue); } public static Project CreateTestProjectWithCustomField() { var project = new Project(); var definition = ExtendedAttributeDefinition.CreateTaskDefinition(CustomFieldType.Text, ExtendedAttributeTask.Text1, "Custom Field"); project.ExtendedAttributes.Add(definition); var task = project.RootTask.Children.Add("Task"); var attribute = definition.CreateExtendedAttribute(); task.ExtendedAttributes.Add(attribute); return project; }