0

I am trying to fetch value set for a custom field for a task in a mpp file. Please help me find the right method in mpxj.mpp library.

I have tried the below code:

object fld = task.getFieldByAlias("EPC");
if (fld != null)
  Console.WriteLine("Custom Field Value : " + Convert.ToBase64String((byte[])fld));

However, the value I got is a set of characters which were not meaningful.

Rohan Rao
  • 2,505
  • 3
  • 19
  • 39
Priya
  • 1
  • Hello! Is EPC an Enterprise Custom Field, or just a normal custom field? Could you provide an example MPP file I can look at? – Jon Iles Apr 19 '22 at 13:44
  • Hi, EPC is a custom field created by me in mpp file, with a lookup attached to it. EPC is added as a column to project tasks sheet and user should select a lookup value for EPC column for a every task. My objective is to get the lookup value for each task. – Priya Apr 20 '22 at 10:22
  • Which custom field column did you use for EPC (e.g. `Text 1`, `Text 2`... etc)? Assuming it was a text column the returned value should be a `String`. Can you provide an example file? (if it's sensitive you can pass it directly to me, my contact details are on the MPXJ site) – Jon Iles Apr 27 '22 at 10:32
  • I created a custom field named EPC, with Type = Text, Entity = Task. Lookup table attached has string values. So if I m fetching EPC value for a task, I should get one of the string values of the underlying lookup table. – Priya Apr 28 '22 at 11:10

0 Answers0