Lookup tables

M

Miaplacidus

I have a custom outline with a lookup table.
Now I'd like to open a text field and display the value in the lookup table.
Can I do that using an equation for the field?
 
G

Guidho

What exactly do you mean by 'open a text field and display the value in the
lookup table'?
Can you give an example?

You want to show it in MS Project? Or PWA?
 
M

Miaplacidus

OK, I have a custom outline field which has numbers associated with certain
kinds of defined tasks.

I can display the field, with the data 4-1-01. I know that 4 indicates
maintenance and 1 indicates stairwells, 2 hallways, 3 offices, 4 conference
rooms, 5 equipment spaces.

But that isn't useful to anyone else, so I would like to be able to create a
field to use in reports and populate that field based on a formula, the data
in the outline field, and a lookup to the description column of the lookup
table for the outline field.

I know, it sounds silly, why not just create the field and be done with it,
but it is a matter of controlling the input consistently.
 
G

Guidho

I assume that by reports you mean the views in PWA?

One option of doing this is using VBA code, to copy the data you need on the
save event of each project.

You need to enable events in the enterprise global template and add code
like this to the onsave event.

Of course, some error handling code must be added, and you need to replace
the numbers to reflect the correct outlinecode and text field.

Dim Tsk As Task
Dim E As LookupTableEntry

For Each Tsk In ActiveProject.Tasks
For Each E In GlobalOutlineCodes(1).LookupTable
If E.FullName = Tsk.EnterpriseOutlineCode1 Then
Tsk.EnterpriseText1 = E.Description
End If
Next
Next

I hope this helps.
Guidho
 

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