Mapping ATTRIB_FIELD_ID back to Table In Database

G

gregkats

I am trying to display the value entered into custom fields stored in
the database. Unfortunately, I won't know what Custom Field they were
entered into so I need to dynamically find what was entered by the
Custom Field Name.

For example, resource custom fields of "Phone Number" and "Company
Name" have been created in the Enterprise Project. Phone number is a
text field and Company Name is an Outline Code.

Because of security reasons I can't use PDS calls. So I am having to
make calls to the database directly.

By using:
SELECT dbo.MSP_FIELD_ATTRIBUTES.ATTRIB_FIELD_ID,
dbo.MSP_ATTRIBUTE_STRINGS.AS_VALUE
FROM dbo.MSP_ATTRIBUTE_STRINGS INNER JOIN
dbo.MSP_FIELD_ATTRIBUTES ON
dbo.MSP_ATTRIBUTE_STRINGS.PROJ_ID = dbo.MSP_FIELD_ATTRIBUTES.PROJ_ID
AND
dbo.MSP_ATTRIBUTE_STRINGS.AS_ID =
dbo.MSP_FIELD_ATTRIBUTES.AS_ID
WHERE (dbo.MSP_FIELD_ATTRIBUTES.ATTRIB_ID = 206) AND
(dbo.MSP_ATTRIBUTE_STRINGS.PROJ_ID = @Proj_id)

I can see that Company Name has a ATTRIB_FIELD_ID = 205521482 and Phone
Number has a ATTRIB_FIELD_ID = 205521542

Knowing how I set up my fields in my database I can see that the
Resources phone number is stored in
MSP_VIEW_PROJ_RES_ENT.ResourceEnterpriseText1 but I don't know how the
customer will set up their custom fields.

So how do you map from the ATTRIB_FIELD_ID to the actual table.field
where the data is stored.

TIA
 
G

Gary L. Chefetz [MVP]

Greg:

You should post this question in the developer group at
microsoft.public.project.developer
 

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