Read custom fields using PSI

C

ctd

Hi,
This is urgent so I hope someone can help. Thanks.

I tried to display a dropdown list of a custom field's values, but kept
having
zero record return. Checked the database and saw my custom field in the
custom field table and its values in the lookup table. Not sure what I was
missing in the code but no record was returned. Below is my code in C#:

private CustomFieldWS.CustomFieldDataSet readCustomFieldDS =
new CustomFieldWS.CustomFieldDataSet();
private LookupTableWS.LookupTableDataSet lookupDS =
new LookupTableWS.LookupTableDataSet();

private void ReadCustomFields()
{
strCustField = "Classification";

DataView dataview = new DataView(readCustomFieldDS.CustomFields);
dataview.RowFilter =
readCustomFieldDS.CustomFields.MD_PROP_NAMEColumn.ColumnName +
" = '" + strCustField + "'";
if (dataview.Count == 0) return;

CustomFieldWS.CustomFieldDataSet.CustomFieldsRow rowCF =

(CustomFieldWS.CustomFieldDataSet.CustomFieldsRow)dataview[0].Row;

foreach (LookupTableWS.LookupTableDataSet.LookupTableTreesRow
row in lookupDS.LookupTableTrees.Rows)
{
if (rowCF.MD_LOOKUP_TABLE_UID == row.LT_UID)
{
ddlTitleClass.Items.Add(row.LT_VALUE_TEXT);
}
}
}
 
D

Dale Howard [MVP]

ctd --

I would recommend you repost this question in the
microsoft.public.project.developer newsgroup and allow our developer friends
to assist you. Hope this helps.
 
S

Stephen Sanderlin [MVP]

See my reply in the Developer NG.

--
Stephen C. Sanderlin, Project MVP
VP of Technology
msProjectExperts
90 John Street, Ste. 404
New York, NY 10038

E:    (e-mail address removed)
NYC:  (646) 736-1688 x26
PA:   (215) 538-5373
Cell: (267) 446-4064
Fax:  (973) 556-1191

http://www.msprojectexperts.com

 
Are You Project 2010 Ready?
Work Management Solutions for Individuals, Teams, and the Enterprise
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top