We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Trouble getting values from a custom field

I´m sitting with a *.mpp file that has some custom columns (I belive they are called custom fields in the Aspose API), and i can´t get the values that exists for those custom fields. I have for now just the evaluation version of Aspose Task17.1.0 installed because i´m just trying to verify that i can get this to work. I can get the names and aliases from the custom fields but i cant get the values that exists. Is this possible and how do i get the values?
The Environment that i work with is Visual Studio Premium 2013 and C# with .Net Framework 4.5
Many thanks!

/Kind regards Björn

Hi Björn,


Thank you for posting your inquiry.

Aspose.Tasks API lets you read the custom attributes for tasks. Please have a look at our documentation section for getting an idea about reading Extended Attributes information. You can get a 30-day temporary license free of cost for evaluating the API without any limitations. If the issue still persists, please share your sample MPP file with us for our investigation. We’ll look into it for assisting you further.

Hi Kashif!

Many Thanks for your Quick reply, I will look into the link you supplied and try to get the values from it and i will gtet back to you with the result if it works or not.
Kind regards
/Björn

Hi Kashif!



It worked great! Thanks!!



Is it possible to see how these values from the tasks how they are connected to Extended Attributes (where I can see the names from the custom fields, is it the FieldID from the task that connects to FieldID on the Extended Attribute)?

Kind regards

/Björn

Hi Bjorn,


You may please use following sample code to display the extended attribute name and value and share the feedback.

Project proj = new Project(@“ProjectExtended.mpp”);<o:p></o:p>

foreach (Task tsk in proj.RootTask.Children)

{

foreach (ExtendedAttribute ea in tsk.ExtendedAttributes)

{

Console.WriteLine(ea.AttributeDefinition.Alias);

Console.WriteLine(ea.AttributeDefinition.FieldName);

Console.WriteLine(ea.Value);

}

}

Hi Kashif!

Once again many thanks for a Quick reply and yes it worked. I could get all the extended attributes that i need (ID, name and so on for traceabillity) and in the same time display the value, it works great now. Many thanks for all quick and helpful guides and support.

Kind regards
/Björn

You are welcome.